You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug 1930466 - Part 1: Use zone.tab to guide time zone canonicalisation. r=dminor
Implement the changes from <tc39/ecma402#877> to reduce
differences in time zone canonicalisation when compared to V8 and JSC (which
both use CLDR time zone data instead of IANA time zone data).
Implementing the `AvailableNamedTimeZoneIdentifiers` spec operation requires to
link time zone identifiers to region codes. When the time zone is listed in the
"zone.tab" file, we can get the region code from "zone.tab". In all other cases
we need to manually map the time zone to a matching region, because CLDR doesn't
have "public" data for this [1]. This is implemented using the new file
"intl/TimeZoneMapping.yaml".
ICU 74 added `ucal_getIanaTimeZoneID` to get the canonical IANA time zone id.
Internally `ucal_getIanaTimeZoneID` first calls `ucal_getCanonicalTimeZoneID`
and then loads a resource bundle to check if there are any time zone ids which
need to be replaced with other ids for compatibility with IANA data. Unfortunately
the resource bundle is not cached, so calling `ucal_getIanaTimeZoneID` instead
of `ucal_getIanaTimeZoneID` adds a considerable performance overhead. To avoid
any performance regressions, we keep our own time zone rewriting code for the
time being.
Using our own code also means we don't have to add a workaround for this CLDR
bug: <https://unicode-org.atlassian.net/browse/CLDR-16439>.
Also remove "Factory" from the list of supported time zone identifiers, because
supporting it was always a bit questionable and latest V8 also doesn't support
it anymore, so we shouldn't run into web-compat issues.
Remove the old generated tests and add "timeZone_links.js" to ensure time zone
links are correctly resolved.
[1] Neither of these two files look like "public" data to me:
- https://github.com/unicode-org/cldr/blob/main/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/TZID.txt
- https://github.com/unicode-org/cldr/blob/main/tools/cldr-code/src/main/resources/org/unicode/cldr/icu/idList.txt
Differential Revision: https://phabricator.services.mozilla.com/D228584
0 commit comments