Intl.Locale.prototype.timeZones

The Intl.Locale.prototype.timeZones property is an accessor property which returns an array of supported time zones for a chosen Locale.

Description

Returns an array with supported time zones for the associated Locale, returned time zones represents an IANA time zone.

Note: If the Unicode Language Identifier does not contain the - for the Unicode region subtag sequence, the returned value is undefined

Examples

Obtaining supported time zones

List supported time zones for a given Locale.

const arEG = new Intl.Locale("ar-EG");
console.log(arEG.timeZones); // logs ["Africa/Cairo"]
const jaJP = new Intl.Locale("ja-JP");
console.log(jaJP.timeZones); // logs ["Asia/Tokyo"]
const ar = new Intl.Locale("ar");
console.log(ar.timeZones); // logs undefined

Specifications

Specification
Intl Locale Info Proposal
# sec-Intl.Locale.prototype.timeZones

Browser compatibility

BCD tables only load in the browser

See also