demo · v130
World Clock via getTimeZones()
Chrome 130 adds locale.getTimeZones() — an explicit method that returns the canonical IANA timezone identifiers for a given BCP-47 locale. Use those zone IDs directly with Intl.DateTimeFormat to show live local times around the world.
Note:
Intl.Locale.prototype.getTimeZones is not available in this browser. Timezone values are sourced from a hardcoded fallback map. Upgrade to Chrome 130+ to use the live API.
live clocks
the code
// Chrome 130+ — getTimeZones() as an explicit method
const locale = new Intl.Locale('ja-JP');
const zones = locale.getTimeZones();
// → ['Asia/Tokyo']
// Use the timezone identifier with Intl.DateTimeFormat
const time = new Intl.DateTimeFormat('ja-JP', {
timeZone: zones[0],
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
hour12: false,
}).format(new Date());
// Multiple timezones: some locales span many zones
const usLocale = new Intl.Locale('en-US');
usLocale.getTimeZones();
// → ['America/Adak', 'America/Anchorage', ..., 'Pacific/Honolulu']
// Region-specific locale pins to one zone
new Intl.Locale('en-GB').getTimeZones();
// → ['Europe/London']
see also
- Relaunch Intl.Locale info feature in newly-added functions — feature index
- Intl.Locale info methods overview — all new methods
- Locale matrix — compare locales across all methods
- Text Direction via getTextInfo() — sister concept demo
- ChromeStatus entry
- TC39 Intl.Locale info proposal