<input type=time> uses AM/PM on a system with a 24h locale
Categories
(Core :: Layout: Form Controls, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox59 | --- | wontfix |
firefox60 | --- | affected |
firefox61 | --- | affected |
People
(Reporter: adrian, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: regression, Whiteboard: [fixed by bug 1370859])
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Updated•7 years ago
|
Comment 2•7 years ago
|
||
Updated•7 years ago
|
Comment 3•6 years ago
|
||
The same issue in Chromium was raised at https://bugs.chromium.org/p/chromium/issues/detail?id=263320 6 years ago…
Could we please have any update on this?
Comment 4•6 years ago
|
||
:hsinyi
The bunch of patch of Bug 1366188 seems to cause this problem. Can you please look into this?
Comment 5•6 years ago
|
||
Not really a regression then, just a bug or behavior or the date/time.
Comment 6•6 years ago
|
||
Ok, so here are several things that may come into play:
- We only use OS locale if the language portion of the locale matches the language portion of Firefox locale by default. That's documented in https://firefox-source-docs.mozilla.org/intl/locale.html#regional-preferences including a preference flag allowing users to override it manually.
You can check what locale we use for regional preferences by going to about:support
and looking at the Internationalization section.
-
Assuming we picked the right locales for regional preferences, I'm not sure if
<input type="time">
uses theServices.locale.regionalPrefsLocales
- if not, it's a bug and it should. -
Once we have that, we could also use mozIOSPreferences API to identify the correct skeleton/pattern for the time picker. This pattern will take into account manual hourCycle set in the OS on Windows/Gnome/Ubuntu/MacOS/Android. I'm not sure if we're doing it right now, but if we don't, we should.
See https://searchfox.org/mozilla-central/source/intl/locale/mozIOSPreferences.idl#92
Comment 7•6 years ago
|
||
This was fixed by bug 1370859. DateTimePickerPanel.jsm initPicker is now using the Services.locale.regionalPrefsLocales locale. That affects both date and time picker.
Comment 9•6 years ago
|
||
Reopen, or new bug?
Comment 10•6 years ago
|
||
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #6)
- Once we have that, we could also use mozIOSPreferences API to identify the correct skeleton/pattern for the time picker. This pattern will take into account manual hourCycle set in the OS on Windows/Gnome/Ubuntu/MacOS/Android.
Why is KDE absent from this list?
Comment 11•6 years ago
|
||
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #6)
Ok, so here are several things that may come into play:
- We only use OS locale if the language portion of the locale matches the language portion of Firefox locale by default. That's documented in https://firefox-source-docs.mozilla.org/intl/locale.html#regional-preferences including a preference flag allowing users to override it manually.
The reasoning behind this given at the above link is flawed; the example given – “Today is 24 października” – is perfectly valid outcome of having English UI and Polish Date/Time format set. Firefox should always use locale of the OS Regional Preferences for displaying date and time regardless of the language of Firefox UI.
Just wanted to report that setting intl.regional_prefs.use_os_locales
to true
in Firefox 65.0.1 was enough to have Firefox respect my OS level regional settings and display time in <input type=time>
in 24h format instead of 12h format.
From about:support;
Application Settings
Requested Locales ["en-US"]
Available Locales ["en-US"]
App Locales ["en-US","und"]
Regional Preferences ["pl-PL"] # ["en-US"] when intl.regional_prefs.use_os_locales == false
Default Locale "und"
Operating System
System Locales ["en-US"]
Regional Preferences ["pl-PL"]
Btw, this "und" locale seems to be a glitch…
My OS:
Operating System: Fedora 29
KDE Plasma Version: 5.14.5
KDE Frameworks Version: 5.55.0
Qt Version: 5.11.3
Kernel Version: 4.20.11-200.fc29.x86_64
Comment 12•6 years ago
|
||
Reopen, or new bug?
No preference.
Why is KDE absent from this list?
Nobody provided KDE variants for https://searchfox.org/mozilla-central/source/intl/locale/gtk/OSPreferences_gtk.cpp - I'm open to reviewing that.
“Today is 24 października” – is perfectly valid outcome of having English UI and Polish Date/Time format set.
I disagree. It's a flawed juxtaposition of internationalization and localization. That effect gets magnified once you hit cases where it's hard to say which locale it is - there are a lot of abbreviation that can mean different things between two languages. I believe it's important for consistency and readability to stick to one localization of all internationalization.
Comment 13•6 years ago
|
||
Filed bug 1532923.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 months ago
|
Description
•