bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39248: format-time-string ignores user's preferred locale


From: Paul Eggert
Subject: bug#39248: format-time-string ignores user's preferred locale
Date: Thu, 23 Jan 2020 00:38:38 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]