Closed Bug 1796393 Opened 2 years ago Closed 1 year ago

Javascript returns problematic timezone, breaking sites

Categories

(Web Compatibility :: Site Reports, defect)

Firefox 106
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: tmus, Unassigned)

Details

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

Steps to reproduce:

Many sites and apps still expect/require the "old" name for the West Greenland timezone; America/Godthab, and does not know about the new name for that same timezone; America/Nuuk.

This causes things such as the Ubiquiti Unifi Manager to fail to load properly on firefox.

Set Linux timezone to America/Godthab (or America/Nuuk), then try:

const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
console.log(tz);

Actual results:

The result is "America/Nuuk", which - while not wrong technically - causes firefox to fail on many sites where Edge/Chrome works fine. The Chromium browsers still return the old name, America/Godthab which sites either expect or tolerate (as the two are identical.

Expected results:

If Firefox were to return America/Nuuk here too, certain sites and apps would magically start to work on Firefox again, with no chance of breakage.

Sites that know America/Nuuk, are aware of America/Godthab too.
Sites that know America/Godthab, does not necessarily know America/Nuuk too.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Component: Widget: Gtk → Internationalization

Blaming for the relevant strings point to ICU updates done by :anba. Not sure if this should canonicalize to something else or what not.

Flags: needinfo?(andrebargull)

Our behaviour is correct per spec: CanonicalizeTimeZoneName requires to canonicalise time zone names according to the info in the tzdata backward file. And the backward has this link:

# Link TARGET LINK-NAME
...
Link America/Nuuk America/Godthab

It's a known issue that Chrome (https://bugs.chromium.org/p/chromium/issues/detail?id=580195) and WebKit (https://bugs.webkit.org/show_bug.cgi?id=218542) don't handle these cases correctly. Both are simply directly calling into ICU for time zone canonicalisation and ICU uses the time zone canonicalisation info from CLDR. CLDR in turn has a stable time zone identifier policy, so it always prefers the old names, whereas IANA prefers the names of cities as used in modern English.

For this specific case, web-compat should either try to reach the "Ubiquiti Unifi Manager" owners to fix their site to correctly accept America/Nuuk. Or alternatively an intervention should be added to change America/Nuuk to America/Godthab.

Flags: needinfo?(andrebargull)
Component: Internationalization → Desktop
Product: Core → Web Compatibility

Alright, though I might get your take on this, as perhaps site compatibility would somehow trump "correctness". I'll start filing bug reports on the sites and services I encounter with this problem.

Please do file issues if you encounter real-world breakage! That would be good information to have. However, I encourage you to file them on webcompat.com instead of here on Bugzilla, as that makes it a bit easier for us to keep track.

First time I ever heard of webcompat.com. Thanks

Thomas, could you please provide more context on the issue? More specifically, how do sites break when following your steps to reproduce?

Flags: needinfo?(tmus)

A needinfo is requested from the reporter, however, the reporter is inactive on Bugzilla. Closing the bug as incomplete.

For more information, please visit BugBot documentation.

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Flags: needinfo?(tmus)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.