1

I try to set the time locale to "C" in my config via (setq system-time-locale "C"). However, when using the emacs --daemon, it is not set properly and I end up with non-english date formats and weekday abbreviations when the system locale is different.

How can I set the time locale when using the daemon?

6
  • I can reproduce this, setting system-time-locale in the init file. The variable holds that value I assigned, but (format-time-string "%c") behaves as if it were still nil. Curious. – phils Aug 17 '20 at 6:23
  • In fact the custom setting is respected when the daemon starts, but not for client frames. So it's behaving somewhat like a terminal-local variable -- except it's not documented as such, and on inspection the variable indicates the custom value in the new frames. – phils Aug 17 '20 at 6:28
  • It looks to me as if the lisp variable isn't used directly. There are internal C functions which read the lisp variable and use that to set the real value, so my guess is that internally the real value actually is terminal-local in effect, and that synchronize_system_time_locale or similar is not being called to set that for new client frames. It sounds like a bug to me. M-x report-emacs-bug – phils Aug 17 '20 at 6:32
  • 2
    Thanks for the confirmation and the deep dive into what might be wrong. I'll file a bug report and report back, once I hear anything. – loki Aug 18 '20 at 6:22
  • Any update? I use org-journal in two locales and its causing havoc not having a common emacs date format. – RichieHH Mar 3 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.