Closed Bug 1751891 Opened 4 years ago Closed 4 years ago

Input type=time does not respect locale

Categories

(Core :: Internationalization, defect)

Firefox 95
defect

Tracking

()

VERIFIED DUPLICATE of bug 1705310

People

(Reporter: jaragunde, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

I have my system configured with English language but local time/date/etc.

LANG=en_US.UTF-8
LC_TIME=es_ES.UTF-8
LC_MONETARY=es_ES.UTF-8
LC_PAPER=es_ES.UTF-8
LC_MEASUREMENT=es_ES.UTF-8
LC_NUMERIC=es_ES.UTF-8

Open any website using an <input type="time">, for example, https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time.

Actual results:

The input will use the en_US format (e.g. 9:00 PM).

Expected results:

I would expect the input to honor the LC_TIME=es_ES setting (in my case, 21:00).

If I set the LANG to Spanish, I get 24-hour inputs (e.g. 21:00).

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Form Controls' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Layout: Form Controls
Product: Firefox → Core

If you go to about:config and set intl.regional_prefs.use_os_locales=true, then it should work as you expect, is that right?

I think this is by design, see the discussion in bug 1705310.

Component: Layout: Form Controls → Internationalization
Flags: needinfo?(jaragunde)
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE

Thanks, Emilio, I got my expected behavior with that switch.

I won't enter the discussion about what's the default behavior, mine seems to be a really minority use case.

Status: RESOLVED → VERIFIED
Flags: needinfo?(jaragunde)
You need to log in before you can comment on or make changes to this bug.