MozillaZine

Linux locale + date formats

User Help for Mozilla Thunderbird
cbrace
 
Posts: 3
Joined: April 5th, 2016, 10:12 pm

Post Posted November 8th, 2019, 12:38 am

Hi all,

I have Thunderbird running under Linux (Mint) with the default locale, en_US. However, I live in Europe, and if possible I would like to stick with en_US as system default but have my Thunderbird calendars using European time/date formats. Since this doesn't appear possible from within Thunderbird (at least the current version?), I am hoping I can find another solution.

Apparently one approach is to use en_DK.utf8. This post explains how to do this: How to change Thunderbird's display time to 24h format?

Here are the steps:
Create the root locale
Code: Select all
    sudo ln -s /usr/share/i18n/locales/en_DK /usr/share/i18n/locales/root
    sudo sh -c "echo 'root.UTF-8 UTF-8' > /var/lib/locales/supported.d/local"
    sudo locale-gen

Copy the Thunderbird launcher locally
Code: Select all
    cp /usr/share/applications/thunderbird.desktop ~/.local/share/applications/

Change the date/time locale for Thunderbird
Code: Select all
    sed -i.bak 's/^Exec=thunderbird %u/Exec=env LC_TIME=root.utf8 thunderbird %u/' ~/.local/share/applications/thunderbird.desktop

But it doesn't work for me. No change in the date formats.

What am I missing here?

I'm wondering why this isn't built into Thunderbird, but that is probably a different topic.

Code: Select all
$ apt show thunderbird
Version: 1:60.9.0+build1-0ubuntu0.18.04.1

Code: Select all
$ uname -a
Linux neptune 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3 (2019-09-02) x86_64 GNU/Linu

tanstaafl
Moderator

User avatar
 
Posts: 45904
Joined: July 30th, 2003, 5:06 pm

Post Posted November 8th, 2019, 6:37 am

Thunderbird defaults to using the same date and time format as your operating system. If you are using Linux you can use the environmental variable "LANG" to specify the date format. In your case you would set "LANG" to "en_US" using the export command in a shell script.

See http://kb.mozillazine.org/Date_display_format for more information.

cbrace
 
Posts: 3
Joined: April 5th, 2016, 10:12 pm

Post Posted November 8th, 2019, 10:15 am

Thank you very much! This works for me: I created the following script called "thunderbird" and put it in ~/bin/
Code: Select all
#!/bin/sh
export LC_TIME=en_DK.UTF-8
exec /usr/bin/thunderbird "$@"

Return to Thunderbird Support


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests