Skip to content

Intl.supportedValuesOf('timeZone') for UTC, Etc/GMT*, and other non-contintent/non-ocean time zone identifiers #778

@justingrant

Description

@justingrant

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"
]

Metadata

Metadata

Assignees

Labels

c: datetimeComponent: dates, times, timezoness: help wantedStatus: help wanted; needs proposal champion

Type

No type

Projects

Status

Previously Discussed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions