aniqa.dev
← Archive11 / 16

Lab noteNo. 11

World Clock

An analog and digital clock for 500+ time zones. Pin cities, slide time forward or back, and see who’s awake.

Made
Oct 2023
Type
Web app
Stack
JS / Moment Timezone / SVG
Links
Live ↗Code ↗
World Clock: an analog and digital clock for New York, a slider to shift time, pinned city cards for London, Lagos, Dhaka, Tokyo and Los Angeles, and more cities to explore.
Click the screenshot to open the live siteclock.aniqa.dev ↗

Why I built it

I wanted to get comfortable with dates and time zones in JavaScript, and to draw a working analog clock in SVG.

What I learned

  1. One clock loop: a single interval updates every clock from the same moment. The first version started a new interval on every shuffle and never cleared them.
  2. A Shift Time slider that moves every clock and marker together.
  3. A Fisher–Yates shuffle, so a city can’t appear twice.
  4. My own abbreviation map, so time zones are spelled out.
  5. Screen reader states: tiles use aria-pressed for the selected city, and the slider reads “+3h” instead of “180”.

Revisited

  1. Nov 2023: added the app manifest and icons.
  2. Oct 2026: redesigned around pinned cities, a Shift Time slider and day/night strips.