[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39248: format-time-string ignores user's preferred locale
From: |
Paul W. Rankin |
Subject: |
bug#39248: format-time-string ignores user's preferred locale |
Date: |
Thu, 23 Jan 2020 13:48:16 +1000 |
User-agent: |
mu4e 1.2.0; emacs 27.0.60 |
Calling function (format-time-string "%x") will output incorrect time
string, ignoring user's preferred locale.
* Steps to reproduce:
1. ensure locale is correct with M-x getenv RET LANG RET
-> en_AU.UTF-8
2. M-: (format-time-string "%x") RET
-> "01/23/20"
3. repeat for env LC_TIME
* Expected results:
The format for %x as per the docs:
%x is the locale’s "preferred" date format.
en_AU locale's "preferred" date format should be DD/MM/YYYY:
"23/01/2020"
i.e. the same as output from shell:
$ locale
LANG="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_CTYPE="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_ALL=
$ date +%x
23/01/2020
* Actual results:
"01/23/20"
GNU Emacs 27.0.60 (build 1, x86_64-apple-darwin19.2.0, NS appkit-1894.20
Version 10.15.2 (Build 19C57)) of 2020-01-18
- bug#39248: format-time-string ignores user's preferred locale,
Paul W. Rankin <=
- bug#39248: format-time-string ignores user's preferred locale, Eli Zaretskii, 2020/01/23
- bug#39248: format-time-string ignores user's preferred locale, Paul Eggert, 2020/01/23
- bug#39248: format-time-string ignores user's preferred locale, Paul W . Rankin, 2020/01/23
- bug#39248: format-time-string ignores user's preferred locale, Eli Zaretskii, 2020/01/23
- bug#39248: format-time-string ignores user's preferred locale, Glenn Morris, 2020/01/23
- bug#39248: format-time-string ignores user's preferred locale, Paul W. Rankin, 2020/01/23
- bug#39248: format-time-string ignores user's preferred locale, Paul Eggert, 2020/01/24
- bug#39248: format-time-string ignores user's preferred locale, Paul W. Rankin, 2020/01/25