Commit ca89c8c
committed
ls: honor LC_TIME for --time-style=locale via uucore helper
Add format_system_time_locale_aware in uucore::time that runs the
format string through i18n::datetime::localize_format_string when a
non-C LC_TIME locale is active, and route ls's display_date through
it. Fixes month names and alternate-calendar years (Persian,
Buddhist, Ethiopian) matching GNU. Also generalize uutests'
is_locale_available to derive the expected charmap from the locale
suffix so non-UTF-8 locales work, and consolidate the ls locale
tests into a single data-driven case.1 parent 41ac7e7 commit ca89c8c
2 files changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
623 | | - | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
624 | 630 | | |
625 | 631 | | |
626 | 632 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
19 | 34 | | |
20 | 35 | | |
21 | 36 | | |
| |||
108 | 123 | | |
109 | 124 | | |
110 | 125 | | |
| 126 | + | |
111 | 127 | | |
112 | 128 | | |
113 | 129 | | |
| |||
0 commit comments