-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
tc39/test262
#4442Labels
c: datetimeComponent: dates, times, timezonesComponent: dates, times, timezoness: help wantedStatus: help wanted; needs proposal championStatus: help wanted; needs proposal champion
Milestone
Description
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?
Intl.supportedValuesOf('timeZone').filter(z => !['Asia', 'Africa', 'Europe', 'Australia', 'America', 'Antarctica', 'Atlantic', 'Pacific', 'Indian', 'Arctic'].some(c => z.startsWith(c)))
// => Chrome: []
// => Safari: ["UTC"]
// => Firefox: [
"CET",
"CST6CDT",
"EET",
"EST",
"EST5EDT",
"Etc/GMT+1",
"Etc/GMT+10",
"Etc/GMT+11",
"Etc/GMT+12",
"Etc/GMT+2",
"Etc/GMT+3",
"Etc/GMT+4",
"Etc/GMT+5",
"Etc/GMT+6",
"Etc/GMT+7",
"Etc/GMT+8",
"Etc/GMT+9",
"Etc/GMT-1",
"Etc/GMT-10",
"Etc/GMT-11",
"Etc/GMT-12",
"Etc/GMT-13",
"Etc/GMT-14",
"Etc/GMT-2",
"Etc/GMT-3",
"Etc/GMT-4",
"Etc/GMT-5",
"Etc/GMT-6",
"Etc/GMT-7",
"Etc/GMT-8",
"Etc/GMT-9",
"Factory",
"HST",
"MET",
"MST",
"MST7MDT",
"PST8PDT",
"UTC",
"WET"
]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: datetimeComponent: dates, times, timezonesComponent: dates, times, timezoness: help wantedStatus: help wanted; needs proposal championStatus: help wanted; needs proposal champion
Type
Projects
Status
Previously Discussed