Javascript returns problematic timezone, breaking sites
Categories
(Web Compatibility :: Site Reports, defect)
Tracking
(Not tracked)
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.
Comment 1•2 years ago
|
||
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.
Updated•2 years ago
|
Comment 2•2 years ago
|
||
Blaming for the relevant strings point to ICU updates done by :anba. Not sure if this should canonicalize to something else or what not.
Comment 3•2 years ago
|
||
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
.
Updated•2 years ago
|
Reporter | ||
Comment 4•2 years ago
|
||
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.
Comment 5•2 years ago
|
||
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.
Reporter | ||
Comment 6•2 years ago
|
||
First time I ever heard of webcompat.com. Thanks
Comment 7•2 years ago
|
||
Thomas, could you please provide more context on the issue? More specifically, how do sites break when following your steps to reproduce?
Comment 8•1 year ago
|
||
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.
Description
•