World Clock — live time across cities
Pin up to 20cities and watch their clocks tick side by side. Daylight-saving and historical offsets come from the IANA Time Zone Database via the browser's Intl API — no signup, no ads, no network calls after the page loads.
How it works
A world clock has two moving parts: a single source of truth for the current UTC instant, and a way to translate that instant into the local wall clock of each pinned city. This tool keeps both parts in the browser.
The UTC instant is your device's clock, read once per second via Date.now(). If your system clock is correct (most are, since the OS syncs to NTP), every tile sees the same instant and the offsets line up to the second.
The wall-clock translation uses the ECMAScript Internationalization API. Calling new Intl.DateTimeFormat("en-US", { timeZone: "Asia/Tokyo" }).formatToParts(date) returns the wall-clock components — year, month, day, hour, minute, second, weekday — for that UTC instant in Tokyo's local time. The browser ships the full IANA Time Zone Database, so the runtime knows every zone's historical offsets and every daylight-saving rule without us shipping extra data.
Daylight saving is handled automatically. London tiles read 14:30 BST in July and 14:30 GMT in December because the IANA dataset encodes the transition rule; we never compute it by hand. Zones without DST (like Asia/Colombo at UTC+5:30, Asia/Kolkata at UTC+5:30, or Asia/Tokyo at UTC+9) sit on the same offset year-round and the tile reflects that.
Each tile also shows the offset, both as a numeric stamp (e.g. UTC+05:30) and as a short abbreviation (e.g. IST). To catch the rare case where a browser's tz tables ship in a broken state, the offset is derived twice in independent code paths — once by decomposing the wall clock and once by parsing the runtime's longOffset token. When the two agree, the tile carries a small verified chip; when they disagree, the chip disappears so you know the runtime is misbehaving and not the page.
Pinned cities live in localStorage under a versioned key. The first pinned city is treated as the reference, and every other tile shows a +1 day / -1 day chip when its calendar date differs — useful for catching the trap where 22:00 Colombo on Friday is already Saturday morning in Auckland.
Worked examples
Frequently asked questions
Sources & references
- IANA Time Zone Database (tzdata) — source of all offsets and DST rules
- ECMA-402 — Intl.DateTimeFormat constructor specification
- MDN — Intl.DateTimeFormat.prototype.formatToParts()
- Wikipedia — list of tz database time zones
Default cities (Asia/Colombo, Europe/London, America/New_York, Asia/Tokyo) and all helpers were last cross-checked against the runtime's IANA tables on 2026-05-11. The tz database is maintained continuously by IANA; updates reach users via browser releases.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Spot a city missing, a wrong offset, or a DST glitch?
Email me at [email protected] — most fixes ship within 24 hours.