unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39248: format-time-string ignores user's preferred locale
@ 2020-01-23  3:48 Paul W. Rankin
  2020-01-23  5:56 ` Eli Zaretskii
  2020-01-23  8:38 ` Paul Eggert
  0 siblings, 2 replies; 16+ messages in thread
From: Paul W. Rankin @ 2020-01-23  3:48 UTC (permalink / raw)
  To: 39248

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





^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-01-26 10:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-23  3:48 bug#39248: format-time-string ignores user's preferred locale Paul W. Rankin
2020-01-23  5:56 ` 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

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).