-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
Rust (incorrect - uses US format regardless of locale)
$ LC_ALL=fr_FR.UTF-8 cargo run -q --features unix -- date -d '1997-01-19 08:17:48' +%x
01/19/97
# Uses US format MM/DD/YY instead of locale-specific format
GNU (correct - respects locale)
$ LC_ALL=fr_FR.UTF-8 /usr/bin/date -d '1997-01-19 08:17:48' +%x
19/01/1997
# Uses French format DD/MM/YYYY as expected
The %x format specifier should output the locale's date representation (obtained from
nl_langinfo(D_FMT)), but uutils uses a hardcoded US format.
This also affects %X (locale time format) and %r (locale 12-hour time format) which should use
nl_langinfo(T_FMT) and nl_langinfo(T_FMT_AMPM) respectively.
Reactions are currently unavailable