Thunderbird and Lightning keep showing 12h AM/PM times even though my "en_DK" LC_TIME specify 24h times

RESOLVED INVALID

Status

Thunderbird
General
RESOLVED INVALID
8 months ago
8 months ago

People

(Reporter: Ronan Jouchet, Unassigned)

Tracking

56 Branch
Unspecified
Linux

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 months ago
Regardless of my LC_TIME, Thunderbird displays 12h (AM/PM) times.

After reading
https://wiki.archlinux.org/index.php/Locale#LC_TIME:_date_and_time_format
, I tried setting LC_TIME=en_DK.UTF-8 to get 24h times, but they stay 12h-based.

Whether done globally by updating `/etc/locale.conf` or once by running
`LANG= LC_TIME=en_DK.UTF-8 thunderbird`, Thunderbird and Lightning
keep showing 12h times. For example, (Short) "8/9/17, 12:50 PM" or 
(Long) "Wednesday, August 15, 2017 9:00 PM"

- I think I remember it *used to work*. Not sure when things broke.
- `locale -a` returns: C, en_DK.utf8, en_US.utf8, POSIX
- I did log out after updating my locale.conf
- `sudo locale-gen` works and generates [en_US, en_DK]
- Thunderbird 56.0b2-build1 on Arch Linux, up-to-date
- Possible dup of bug 236147, bug 379279
- Output of `locale`:

> LANG=en_US.UTF-8
> LC_CTYPE=en_US.UTF-8
> LC_NUMERIC=en_US.UTF-8
> LC_TIME=en_DK.UTF-8
> LC_COLLATE="en_US.UTF-8"
> LC_MONETARY=en_US.UTF-8
> LC_MESSAGES="en_US.UTF-8"
> LC_PAPER=en_US.UTF-8
> LC_NAME=en_US.UTF-8
> LC_ADDRESS=en_US.UTF-8
> LC_TELEPHONE=en_US.UTF-8
> LC_MEASUREMENT=en_US.UTF-8
> LC_IDENTIFICATION=en_US.UTF-8
> LC_ALL=

Comment 1

8 months ago
What do you see in
Tools > Options > Advanced, General: Date and Time Formatting?

Also see bug 1366134 comment #32 (and following comments) and bug 1337069.
Previous comments on this issue: Bug 1344594 comment #59.
(Reporter)

Comment 2

8 months ago
Thanks for the fast feedback, Jorg!

(In reply to Jorg K (GMT+2) from comment #1)
> What do you see in
> Tools > Options > Advanced, General: Date and Time Formatting?

I see:

- Application locale: English (United States)
- Regional settings locale: English (United States)

But I don't understand what these are bound to, and how I could
get my time preferences honored by these choices. To reformulate,
and following on bug 1366134 comment 6, yes I'm part of the users
who like their software English US, but also dislike 12h US dates
and would prefer 24h dates.

-> Reformulation: given the recent platform refactors,
                  is there a way for me to keep using under Linux
                  an en_US Tb but have 12h dates?

> Also see bug 1366134 comment #32 (and following comments) and bug 1337069.
> Previous comments on this issue: Bug 1344594 comment #59.

Thanks for the pointers :) . That's a lot of discussion to digest,
do you confirm that Bug 1344594 comment 59 (ignoring LC_* and honoring
GNOME setting) is where we stand now? If yes, it is not what I am seeing
(Shell does show 24h dates to me), should I file a bug?

Comment 3

8 months ago
(In reply to Ronan Jouchet from comment #2)
> - Application locale: English (United States)
> - Regional settings locale: English (United States)
Then you loose :-(
Just thinking, if your GNOME respects 24h, why do you try running with en-DK at all? The 12h/24h format should already follow any adjustments you've made to en-US. Could it be that the software is looking to adjustments made to en-US but you've made them to en-DK?
 
> But I don't understand what these are bound to, ...
The first one is the application locale, obviously en-US for en-US software.
The second one is dug out from the system, works fine on Windows, no idea on Linux, I think you need to follow up in bug 1337069.

BTW: Reformulation: ... but have 24h dates, right?

> Thanks for the pointers :) . That's a lot of discussion to digest,
> do you confirm that Bug 1344594 comment 59 (ignoring LC_* and honoring
> GNOME setting) is where we stand now?
No, I can't, I'm not on Linux and we don't own Mozilla core who do all this stuff under the covers.

> If yes, it is not what I am seeing
> (Shell does show 24h dates to me), should I file a bug?
Well, let's await the answer to bug 1344594 comment #60.
(Reporter)

Comment 4

8 months ago
(In reply to Jorg K (GMT+2) from comment #3)
> (In reply to Ronan Jouchet from comment #2)
> > - Application locale: English (United States)
> > - Regional settings locale: English (United States)
> Then you lose :-(
> Just thinking, if your GNOME respects 24h, why do you try running with en-DK
> at all? The 12h/24h format should already follow any adjustments you've made
> to en-US. Could it be that the software is looking to adjustments made to
> en-US but you've made them to en-DK?

I'm running with en_DK because it used to be the way to get Thunderbird to show
24h dates until a few versions ago... then these refactors broke it, so I'm looking
for the new way to accomplish the same thing. I made no changes to en-US or en-DK,
my "end-user goal" is simply to get 24h dates, and so far the (admittedly arcane)
way to get that was to set LC_TIME=en_DK.UTF-8. But I don't care about the way,
just gimme 24h dates :D

> > But I don't understand what these are bound to, ...
> The first one is the application locale, obviously en-US for en-US software.
> The second one is dug out from the system, works fine on Windows, no idea on
> Linux, I think you need to follow up in bug 1337069.
> 
> BTW: Reformulation: ... but have 24h dates, right?

Right, I meant 24h ^^. Okay I'll follow bug 1337069, thanks.

> > Thanks for the pointers :) . That's a lot of discussion to digest,
> > do you confirm that Bug 1344594 comment 59 (ignoring LC_* and honoring
> > GNOME setting) is where we stand now?
> No, I can't, I'm not on Linux and we don't own Mozilla core who do all this
> stuff under the covers.
> 
> > If yes, it is not what I am seeing
> > (Shell does show 24h dates to me), should I file a bug?
> Well, let's await the answer to bug 1344594 comment #60.

Alright, thanks again for the fast feedback, and for adding the needinfo!

Comment 5

8 months ago
I'd try using en-US and setting that to 24h. Your en-DK is not being picked up for whatever reason.
(Reporter)

Comment 6

8 months ago
(In reply to Jorg K (GMT+2) from comment #5)
> I'd try using en-US and setting that to 24h.
> Your en-DK is not being picked up for whatever reason.

A quick google search hints that it's not recommended to edit stock Linux locales,
they seem to be deep entrenched in glibc, you just use them. Put differently,

- In Windows, yes you can customize/override every sub-setting of your locale.

- In Linux you don't "edit en_US and modify its TIME sub-setting to 24h",
  looks like the accepted, documented everywhere way to override a
  LC_SUB-SETTING is to set LC_SUB-SETTING to a matching locale.

So, even if I have nothing to do with Danish English, under Linux, yes, the way
to get 24h time is to set LC_TIME to Danish English, because it uses 24h times.

Will keep following bug 1344594 comment #60, and look at creating a custom locale:
https://askubuntu.com/questions/21316/how-can-i-customize-a-system-locale
(Reporter)

Comment 7

8 months ago
Got an answer from :zibi on bug 1344594 comment #61:
Dconf preference `org.gnome.desktop.interface.clock-format`
needs to be *explicitly* set to '24h'. After that and a
Thunderbird restart, I get my 24h times \o/ . Thanks Jorg :)

Comment 8

8 months ago
OK, let's close this and keep an eye on bug 1389972 and bug 1337069.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.