-
Notifications
You must be signed in to change notification settings - Fork 106
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
Intl.supportedValuesOf('timeZone')
for UTC, Etc/GMT*, and other non-contintent/non-ocean time zone identifiers
#778
Comments
Intl.supportedValuesOf calls AvailableCanonicalTimeZones, which computes the result based on all supported time zone and link names.
So all additional time zones returned by Firefox are correct and should also be returned by the other browsers, as long as the time zone id is supported by |
In the latest TZDB, thanks to @justingrant, the legacy zones like "WET" are now links in I think that should make this issue easier to resolve, now? I think we should go ahead and make a PR. |
AFAIK, no PR for the ECMA 402 spec is needed. But JSC and V8 don't currently follow the current spec because they omit So changing this is really a matter of convincing implementers to follow the spec. |
On the other hand, if we want to reify the no-Etc behavior of V8/JSC into the spec, that would require a normative PR. Should we discuss this at the next TG2 meeting? |
I think impls should return Etc/* time zones in supportedValuesOf, and not WET/CST/... Is this what the spec currently requires? If so, then maybe we only need to add some tests. |
Yes. There is no filtering out of |
As part of work on proposal-canonical-tz, I noticed that JS engines have very different results from
Intl.supportedValuesOf('timeZone')
for time zones that are not associated with a continent or ocean.V8 does not return any of these zones. Safari returns only one: UTC. Firefox returns 40 zones, including "UTC", Etc/ zones like "Etc/GMT+11", and a few others like "EST" and "CET".
Should the 402 spec be more prescriptive about what kinds of canonical time zone identifiers should vs. should not be returned by this API?
The text was updated successfully, but these errors were encountered: