How ait0xin/world-time-clock works
This is a single-page world-time watch, implemented in index.html. The user selects a home city or changes it with the pusher or keyboard; the watch updates its city and hour rings, day/night band, and home-time hands. Its clock synchronizes against three independent time sources, accepting a source only when another agrees, and reports the winner in the document title. The README also documents dark-backdrop and home-city persistence, plus a fixed-time query option. Source excerpts were unavailable, so the diagram reflects documented behavior rather than inspected call sites.
Main entry points: index.html Atomic Time Sync
Components 16
Watch Display
- Watch Display
index.html - City Ring
index.html - 24-Hour Ring
index.html - Day/Night Band
index.html - Home-Time Hands
index.html - Document Title
index.html
Controls & State
- City & Backdrop Controls
index.html - Preference Persistence
index.html
Time Synchronization
- Atomic Time Sync
index.html - Fixed-Time Query
index.html
Other components
- User
- localStorage
- Cookie
- worldtimeapi.org
- timeapi.io
- Serving Origin Date
Connections 18
- User → City & Backdrop Controls: clicks or presses
- City & Backdrop Controls → City Ring: selects home city
- City & Backdrop Controls → Watch Display: toggles backdrop
- City & Backdrop Controls → Preference Persistence: saves preferences
- Preference Persistence → localStorage: reads and writes
- Preference Persistence → Cookie: writes backdrop
- Atomic Time Sync → worldtimeapi.org: queries time
- Atomic Time Sync → timeapi.io: queries time
- Atomic Time Sync → Serving Origin Date: requests Date header
- worldtimeapi.org → Atomic Time Sync: returns time
- timeapi.io → Atomic Time Sync: returns time
- Serving Origin Date → Atomic Time Sync: returns Date header
- Fixed-Time Query → Atomic Time Sync: overrides instant
- Atomic Time Sync → City Ring: supplies current time
- Atomic Time Sync → 24-Hour Ring: supplies current time
- Atomic Time Sync → Day/Night Band: supplies home time
- Atomic Time Sync → Home-Time Hands: supplies home time
- Atomic Time Sync → Document Title: reports sync result