Firefox No Longer Honors LC_TIME When Printing Date
Categories
(Core :: Internationalization, defect, P4)
Tracking
()
People
(Reporter: ormos-ffb18, Unassigned)
References
Details
Attachments
(1 file)
44.47 KB,
image/png
|
Details |
Reporter | ||
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Updated•7 years ago
|
Reporter | ||
Comment 3•7 years ago
|
||
Reporter | ||
Comment 4•7 years ago
|
||
Updated•7 years ago
|
Reporter | ||
Comment 5•6 years ago
|
||
Reporter | ||
Comment 6•5 years ago
|
||
As of 2019/06/17, about 17 months after the initial report, the buggy behavior persists in:
Mozilla Firefox 67.0.2 BuildID=20190607204818
and
Mozilla Firefox 68.0b10 BuildID=20190613141208
Comment 7•5 years ago
|
||
it would be great for someone to debug why the code in [0] doesnt work for this particular user.
Neil: can you paste your Internationalization second in about:support
?
Marking this as good-first-bug
since it should be trivial for someone with basic C++ skills to refactor the code in any way necessary to fix it. Also P4, since it's likely a result of uncommon setup.
[0] https://searchfox.org/mozilla-central/source/intl/locale/gtk/OSPreferences_gtk.cpp#36
Reporter | ||
Comment 8•5 years ago
|
||
(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #7)
Neil: can you paste your Internationalization second in
about:support
?
Internationalization & Localization
Application Settings
Requested Locales: ["en-US"]
Available Locales: ["en-US"]
App Locales: ["en-US"]
Regional Preferences: ["en-DK"]
Default Locale: "en-US"
Operating System
System Locales: ["en-US"]
Regional Preferences: ["en-DK"]
Reporter | ||
Comment 9•5 years ago
|
||
(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #7)
[...] Also P4, since it's likely a result of uncommon setup.
What specifically is likely to be uncommon about my setup?
Comment 10•5 years ago
|
||
What specifically is likely to be uncommon about my setup?
You're looking to use regional preferences locale that differs from your app UI locale. That's pretty uncommon.
Your UI locale is "en-US" and your regional preferences are "en-DK". That seems to match your request from LC_TIME normalized to Unicode Locale Identifiers.
This is how Unicode CLDR formats en-DK:
(new Date()).toLocaleString("en-DK");
"17/06/2019, 16.41.49"
It seems to me that this is the correct formatting for your requested locale. If you think this is not the correct date time format for en-DK, you may have to request change to CLDR database - http://cldr.unicode.org/index/bug-reports
Updated•5 years ago
|
Reporter | ||
Comment 11•5 years ago
|
||
On my system, locales are "compiled" from locale definition files residing in /usr/share/i18n/locales/.
In /usr/share/i18n/locales/en_DK, the LC_TIME stanza includes these definitions [*]:
%% date formats following ISO 8601-1988
d_t_fmt "%Y-%m-%dT%T %Z"
d_fmt "%Y-%m-%d"
t_fmt "%T"
When a locale is set via an environment variable (e.g., LC_ALL or LC_TIME), users reasonably expect that locale-aware programs will follow the definitions in the corresponding locale definition files. Firefox version 52.0.9 and prior match the definition in the en_DK locale file.
[*] Converted into readable characters.
However, I'm not particularly wedded to LC_TIME=en_DK. I just want dates formatted as %Y-%m-%d without changing the UI language. The en_DK locale has been a way to do that in the past.
Reporter | ||
Comment 12•5 years ago
|
||
(In reply to Neil Ormos from comment #11)
Firefox version 52.0.9 and prior match the definition in the en_DK locale file.
I phrased that inartfully. I meant to say that when the en_DK local is set via LC_ALL or LC_TIME, the date and time formatting behavior of Firefox version 52.0.9 (and prior versions) matches the definition set in the en_DK locale definition file.
Comment 13•5 years ago
|
||
users reasonably expect that locale-aware programs will follow the definitions in the corresponding locale definition files. Firefox version 52.0.9 and prior match the definition in the en_DK locale file.
Right, that's a POSIX model which we moved away from. Gecko is currently using Unicode project based CLDR/ICU model of internationalization. It has a lot of adventages over POSIX and for majority of users the shortcomings are invisible. Unfortunately for users who utilized the customize values in POSIX, that switch is noticable.
I don't believe we'll ever revert that change, but the good news is that it seems that glibc is planning to integrate CLDR as well, which should at least unify the experience.
I just want dates formatted as %Y-%m-%d without changing the UI language. The en_DK locale has been a way to do that in the past.
Understood. I think you may want to find a locale in CLDR that matches that pattern then. Alternatively, I'd be open to allow Gecko to handle hardcoded datetime formats as overrides to CLDR backed model. If you want to contribute a patch, I'll review it.
Comment 14•5 years ago
|
||
This may also be a dupe of bug 1426907 - there are more people who want their date to be formatted this way. It would be nice to see those users rally and contribute :)
Comment 16•4 years ago
|
||
This is not an as uncommon setup as one would think, many IT-workers in european minority language countries, (scandinavian/slavic esp.) actually prefers to use english language as their primary language because it makes it easier to refer to reference documentation which are more plentifully available in english
Comment 17•4 years ago
|
||
Gecko now allows people to override their date/time patterns since bug 1426907.
Thunderbird or Firefox may add it to Preferences (bug 1509096).
We're not going to honor POSIX overrides again
Reporter | ||
Comment 18•4 years ago
|
||
I tried inserting the date/time patterns listed at
https://bugzilla.mozilla.org/show_bug.cgi?id=1426907#c183
into prefs.js
and those strings appear in the list in about:config.
However, the date format has not changed. Is there something else I need to do?
Version 82.0.3
Build ID 20201108180448
Comment 19•4 years ago
|
||
However, the date format has not changed. Is there something else I need to do?
Can you add where did you expect to appear? (what UI screen)
Comment 20•4 years ago
|
||
Version 82.0.3
This has been fixed after 82 release. Please, test in Nightly or wait for 84 release.
Reporter | ||
Comment 21•4 years ago
|
||
Responsive to comment 19, I was expecting to see dates as specified in the file patterns on a file:/// URL referencing a directory.
Reporter | ||
Comment 22•4 years ago
|
||
Responsive to comment 20, thank you for the reply. Could you please advise in which version the change was made so I won't try to test with a version that lacks the change?
Reporter | ||
Comment 23•4 years ago
|
||
Also, I could not figure out how to reopen this closed bug and it was not clear to me whether my follow-up question on a "closed" bug would ever be seen, so I cloned the bug as https://bugzilla.mozilla.org/show_bug.cgi?id=1678139
Should I take some action to withdraw that report?
Reporter | ||
Comment 24•4 years ago
|
||
Also, could you please give me the name of the override preference for the connector mentioned here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1674212
and here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1426907#c185
Is it
intl.date_time.pattern_override.date_time_short
and does a value of "{1} {0}" cause the assembly of the final date/time string to consist of the date followed by the time, separated by a blank?
Also, are there no equivalent overrides including the connector for the medium, long, and full versions of the combined date-time string?
Thank you.
Reporter | ||
Comment 25•4 years ago
|
||
(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #20)
Version 82.0.3
This has been fixed after 82 release. Please, test in Nightly or wait for 84 release.
Thank you for the help. It appears to work in Version 84.0b2 Build ID 20201117192430
Description
•