Live Time Zones, Beautifully
A real-time dashboard with analog and digital clocks, time-zone search, and light/dark themes — in one HTML file.
- Live city grid — six default time zones (Melbourne, San Francisco, London, Bangkok, Tokyo, New York) with accurate times powered by
Intl.DateTimeFormat. - Dual visuals — every card shows a minimalist SVG analog clock with smoothly rotating hour, minute, and second hands alongside a clean digital readout.
- Relative offset badges — see at a glance how each city compares to your local time (for example
+3 hrs ahead) plus aYesterday/Tomorrowlabel when the calendar date differs. - Add any city — search 150+ built-in cities or any IANA time zone and add it to your dashboard. Your list is saved in
localStorage. - Light and dark themes — a smooth animated toggle, with the initial theme taken from your system preference.
- 12h / 24h format — switch formats instantly; the choice is also remembered.
- Responsive and accessible — fluid card grid, keyboard-friendly city search (
/to open), reduced-motion support, and labelled controls.
Open index.html directly in a browser, or serve it with any static server:
python3 -m http.server 8000
# then visit http://localhost:8000The app is a static site with no build step. Host it anywhere that serves static files: GitHub Pages, Netlify, Vercel, Cloudflare Pages, or a plain web server.
- Time zones are resolved from the browser's IANA database through
Intl.DateTimeFormat, so daylight-saving changes are handled automatically. - UTC offsets are derived per time zone and re-checked periodically, keeping badges correct across DST transitions.
- The dashboard state (cities, theme, clock format) is stored locally in your browser. Nothing is sent to a server.
worldclock/
├── index.html # the entire app: markup, styles, and scripts
├── preview.png # dashboard screenshot used in this README
└── README.md
Contributions are welcome — bug reports, feature ideas, accessibility improvements, and documentation fixes alike. Please read CONTRIBUTING.md and the Code of Conduct before opening a pull request.
- Found a bug? Open a bug report
- Have an idea? Request a feature
- Found a vulnerability? Please follow SECURITY.md and report it privately.
| Document | Purpose |
|---|---|
| README.md | Overview, setup, controls, and architecture |
| AGENTS.md | Handoff for the next maintainer or agent |
| docs/ARCHITECTURE.md | File layout, state, time maths, render loop |
| docs/REPRODUCTION.md | How to rebuild the project from scratch |
| docs/DEPLOYMENT.md | GitHub Pages hosting, checks, rollback |
| docs/TESTING.md | What was verified, manual test matrix |
| CHANGELOG.md | Notable changes and release history |
| CONTRIBUTING.md | Local workflow, constraints, and pull request checks |
| SECURITY.md | Supported versions and private vulnerability reporting |
| LICENSE | MIT licence |
Released under the MIT License © 2026 Somphol Boonjing.