GNU bug report logs - #39248
format-time-string ignores user's preferred locale

Previous Next

Package: emacs;

Reported by: "Paul W. Rankin" <hello <at> paulwrankin.com>

Date: Thu, 23 Jan 2020 03:54:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 39248 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: "Paul W. Rankin" <hello <at> paulwrankin.com>
Cc: 39248 <at> debbugs.gnu.org
Subject: Re: format-time-string ignores user's preferred locale
Date: Thu, 23 Jan 2020 00:38:38 -0800
Thanks for the bug report. I don't observe the problem on GNU/Linux; for 
example, the following shell command:

LC_ALL=en_AU.utf8 emacs -Q -batch -eval '(message "%s" (format-time-string "%x"))'

outputs "23/01/20", which is the same thing that the shell command 
"LC_ALL=en_AU.utf8 date +%x" outputs. I don't have easy access to macOS so I'll 
need your help to debug this.

I suggest that you build Emacs with debug symbols and with optimization off 
(e.g., "make clean; make CFLAGS='-g3 -O0'"), and then run it under a debugger, 
and plant a breakpoint on the nstrftime function and then single-step and see 
what goes wrong. Something like this:

$ make clean
$ make CFLAGS='-g3 -O0'
$ gdb src/emacs
(gdb) b nstrftime
(gdb) r -Q -batch -eval '(message "%s" (format-time-string "%x"))'
(gdb) n
(gdb) n
...

This will help us see whether the bug is in Emacs or in the underlying strftime 
function.




This bug report was last modified 5 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.