-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
find_canonical_from_bcp47
returns non-canonical timezones
#6032
Comments
@justingrant can explain why we obey some of the links but not others. |
That ECMA-402 spec link is out of date. Here's the current spec: https://tc39.es/ecma402/#sec-use-of-iana-time-zone-database. The new spec text defines how and why JS (following CLDR's long-running practice) deviates from the default build options of the IANA Time Zone Database, and defines how future TZDB changes should be handled. Based on the current spec text,
Note that this is not new behavior... it's just newly specified. CLDR has been doing this for 10+ years, modulo renamed IDs like Europe/Kiev where CLDR now has a new Let me know if this was the info you were looking for! |
Thanks.
Well, before 2021, every zone in So we shouldn't be using the term canonical, because what we're returning is not a tzdb-canonical identifier. We also shouldn't use term primary zone, because UTS-35 uses that for something else. Thoughts? Is there any definition on the UTS-35 side which zones get included? Is it just |
Lol, yeah. I was mostly referring to that CLDR's approach hasn't changed recently even though IANA's has.
The closest is probably this text in UTS-35:
This is IMO a pretty good summary and is AFAICT both accurate and aligned with the new ECMA-402 spec text. But what's lacking in UTS-35 is text that defines how to map aliases to their primary/canonical zones. Although this mapping is intuitive, turning it into an algorithm was surprisingly hard for countries that have multiple zones in zone.tab. Most of the work in ECMA-402's new text was defining this algorithm without leaving ambiguity for implementers. There's also https://www.unicode.org/reports/tr35/tr35-dates.html#Time_Zone_Names which contains some of the same info as the other text I excerpted above.
It's
Yep, avoiding this ambiguity was one of the reasons we picked a new term on the ECMAScript side.
It's probably unlikely that ECMAScript will change its terms now that the spec changes were already approved and how hard it was to get consensus on all the changes, but I think it's OK if a different term is chosen on the Unicode side. And it does seem reasonable given that "primary zone" means the zone for a particular region. Let us know what you end up making, if you do end up changing UTS-35. I'd be happy to review any changes. |
but
Europe/Oslo
is a link in TZDB: https://github.com/eggert/tz/blob/271a5784a59e454b659d85948b5e65c17c11516a/backward#L239The text was updated successfully, but these errors were encountered: