From: "Paul W. Rankin" <hello@paulwrankin.com>
To: 39248@debbugs.gnu.org
Subject: bug#39248: format-time-string ignores user's preferred locale
Date: Thu, 23 Jan 2020 13:48:16 +1000 [thread overview]
Message-ID: <m236c625q7.fsf@paulwrankin.com> (raw)
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
next reply other threads:[~2020-01-23 3:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 3:48 Paul W. Rankin [this message]
2020-01-23 5:56 ` bug#39248: format-time-string ignores user's preferred locale Eli Zaretskii
2020-01-23 6:44 ` Paul W. Rankin
2020-01-23 14:19 ` Eli Zaretskii
2020-01-23 8:38 ` Paul Eggert
2020-01-23 13:12 ` Paul W. Rankin
2020-01-23 18:05 ` Eli Zaretskii
2020-01-23 22:04 ` Glenn Morris
2020-01-24 3:17 ` Paul W. Rankin
2020-01-24 7:35 ` Paul Eggert
2020-01-25 9:36 ` Paul W. Rankin
2020-01-25 11:18 ` Alan Third
2020-01-25 11:42 ` Paul W. Rankin
2020-01-25 12:03 ` Alan Third
2020-01-26 8:35 ` Paul Eggert
2020-01-26 10:26 ` Alan Third
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m236c625q7.fsf@paulwrankin.com \
--to=hello@paulwrankin.com \
--cc=39248@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).