JavaScript Array of World Time Zones

Use IANA time-zone identifiers when JavaScript needs a named region such as Asia/Kolkata, Europe/Paris or America/Los_Angeles. A named zone is more useful than a fixed UTC offset because regional daylight-saving and historical rules can change the effective offset.

const zones = Intl.supportedValuesOf("timeZone");

Copyable JavaScript Time-Zone Array Top ↑

The list below is generated by the server's IANA time-zone database. You can copy it directly into JavaScript.

Get Supported Time Zones at Runtime Top ↑

Where supported, Intl.supportedValuesOf("timeZone") returns the time-zone identifiers recognized by the JavaScript runtime.

const zones = Intl.supportedValuesOf("timeZone");
console.log(zones.length);
console.log(zones[0]);

Populate a Time-Zone Select Menu Top ↑

const select = document.querySelector("#timeZone");
const zones = Intl.supportedValuesOf("timeZone");

for (const zone of zones) {
  const option = document.createElement("option");
  option.value = zone;
  option.textContent = zone;
  select.append(option);
}

Use the Selected Zone Top ↑

const formatter = new Intl.DateTimeFormat(undefined, {
  timeZone: "Asia/Kolkata",
  dateStyle: "medium",
  timeStyle: "long"
});

console.log(formatter.format(new Date()));

Why a Zone Name Is Better Than a Fixed Offset Top ↑

America/New_York cannot be safely replaced with one permanent numeric offset because its offset changes during daylight-saving transitions. A zone identifier lets the runtime apply the correct rules for the date being formatted.

Compatibility and Fallback Top ↑

If Intl.supportedValuesOf() is unavailable in an older environment, ship a known list or generate one on the server. The copyable list above is generated with PHP's timezone_identifiers_list().

const zones = Intl.supportedValuesOf
  ? Intl.supportedValuesOf("timeZone")
  : fallbackTimeZones;

See the live JavaScript time-zone clock.




Subscribe to our YouTube Channel here



plus2net.com










✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer