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


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: "Paul W. Rankin" <hello <at> paulwrankin.com>, Glenn Morris <rgm <at> gnu.org>
Cc: 39248 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, Alan Third <alan <at> idiocy.org>
Subject: bug#39248: format-time-string ignores user's preferred locale
Date: Thu, 23 Jan 2020 23:35:20 -0800
[Message part 1 (text/plain, inline)]
On 1/23/20 7:17 PM, Paul W. Rankin wrote:
> The relationship doesn't appear as the same as on GNU/Linux.

It's similar, in that one can launch apps in various ways (e.g., via Gnome) 
without involving shell environment variables.

Looking into this a bit more, I see that Alan Third wrote a fix for this problem 
(which is apparently quite a zoo in macOS, as Apple keeps changing how to set 
environment variables!) into Emacs in master commit 
2016-02-11T02:26:50Z!alan <at> idiocy.org. However, Emacs currently sets the LANG 
environment variable in ns_init_locale *after* Emacs uses LANG to set the 
LC_TIME locale, which is not what is wanted here. So, please try the attached 
patch to master. You'll need to grab the latest master as I recently installed a 
locale cleanup patch while looking into this mess.

If this patch doesn't work for you, perhaps you can write a small variant of it 
that does work.
[0001-Propagate-NSLocale-into-Emacs-better.patch (text/x-patch, attachment)]

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

Previous Next


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