Build Your Own International Clock: A Step-by-Step GuideKeeping accurate time across multiple time zones is essential for travelers, remote teams, and anyone with international connections. Building your own international clock is a rewarding project that combines practical functionality with satisfying DIY craftsmanship. This guide walks you through options from a simple multi-dial wall display to a digital network-synced clock, covering materials, electronics, software options, and step-by-step assembly. Choose the approach that suits your skills and needs.
Project options (pick one)
- Simple analog multi-dial clock — multiple mechanical or battery clocks mounted together, each set to a different city.
- Quartz-movement multi-clock with unified frame — clean, classic look using individual clock movements.
- Microcontroller-driven digital clock (LED/LCD) — programmable, can display multiple zones, add daylight saving logic.
- Network Time Protocol (NTP) connected clock — syncs automatically over Wi‑Fi; best for accuracy.
- Hybrid: analog faces with a small microcontroller module to display city names, DST indicators, or alarms.
Materials and tools (for digital NTP clock example)
Materials:
- Microcontroller with Wi‑Fi (ESP32 recommended)
- 2.8”–3.5” TFT or IPS color display with SPI interface (or 160×128/240×320 OLED)
- Real-time clock (RTC) module (optional if using NTP; useful for offline)
- Power supply (5V USB or 5V–12V depending on display)
- Enclosure (wood, acrylic, 3D-printed)
- Mounting hardware, spacers, screws
- Optional: external temperature sensor, speaker, buttons for input
Tools:
- Soldering iron and solder
- USB cable
- Screwdrivers, drill (for enclosure)
- Computer for development (Arduino IDE, PlatformIO, or ESP-IDF)
Design considerations
- Number of time zones to display — common choices: 4, 6, 8, or full world map.
- Display style — analog-look graphics vs. numeric digital time; compact grid vs. horizontal lineup.
- Daylight Saving Time (DST) handling — automatic via timezone databases or manual toggles.
- Network dependence — NTP gives precision; include an RTC for offline reliability.
- Power and placement — wall-mounted vs. desktop; consider cable routing and ventilation.
Step 1 — Plan the layout and features
Decide:
- Which cities/time zones (e.g., New York, London, Tokyo, Sydney).
- Whether to show seconds, date, or AM/PM indicators.
- UI controls: none (display only), a single button to cycle views, or touch input.
- Visual design: fonts, background, city labels, flags or country codes.
Sketch a mockup of the final display. For example: a 4-zone layout with city name above each clock, current date centered, and small DST icons.
Step 2 — Gather hardware and software
Hardware:
- ESP32 dev board (e.g., LOLIN D32, NodeMCU-32S)
- 240×320 SPI TFT display (ILI9341/ILI9488) or 320×240 IPS
- MicroSD breakout (optional for fonts, images)
- DS3231 RTC (optional)
- Real-time button(s) and buzzer (optional)
Software:
- Arduino IDE or PlatformIO
- Libraries: Adafruit_GFX / TFT_eSPI / LVGL (for graphics), NTPClient or time.h, RTClib (if using RTC)
- Time zone conversion library (e.g., tz database helpers or manual offsets). For ESP32, use the built-in time functions with zone strings like “GMT-5EDT4” or integrate the IANA TZ database if you want DST accuracy for many zones.
Step 3 — Prototype the display (code overview)
- Set up the display library (TFT_eSPI or Adafruit_ILI9341).
- Connect to Wi‑Fi.
- Initialize NTP and request UTC time.
- For each configured time zone, compute local time using offsets or TZ strings.
- Draw clocks or digital time strings on the display; refresh every second (or minute for lower power).
Example Arduino-style pseudocode structure:
#include <TFT_eSPI.h> #include <WiFi.h> #include <time.h> TFT_eSPI tft = TFT_eSPI(); // initialize display const char* ssid = "yourSSID"; const char* pass = "yourPASS"; struct Zone { const char* name; const char* tz; int x,y; } zones[] = { {"New York", "America/New_York", 10, 20}, {"London", "Europe/London", 160, 20}, {"Tokyo", "Asia/Tokyo", 10, 140}, {"Sydney", "Australia/Sydney", 160, 140} }; void setup() { Serial.begin(115200); tft.init(); WiFi.begin(ssid, pass); while (WiFi.status() != WL_CONNECTED) delay(500); configTime(0, 0, "pool.ntp.org"); // sync UTC } void loop() { time_t now; struct tm timeinfo; time(&now); for (auto &z : zones) { // Use setenv/TZ + tzset or localtime_r with timezones if available, // or apply known offsets and DST rules // Draw the formatted time at z.x, z.y on tft } delay(1000); }
Notes:
- Many embedded environments support TZ via setenv(“TZ”,”
”) and tzset(), then localtime_r to get correctly adjusted local times for IANA zone names. - If the device will be offline frequently, maintain RTC time and occasionally resync with NTP.
Step 4 — Handle time zones and DST correctly
Options:
- Use built-in OS TZ handling (setenv + tzset) with IANA names (preferred for correct DST).
- Use a lightweight TZ library that contains DST transition rules.
- For a small fixed set of cities, precompute DST start/end rules and apply them manually.
Example setenv call:
setenv("TZ", "America/New_York", 1); tzset(); localtime_r(&now, &timeinfo);
Switch setenv per zone when computing each zone’s localtime.
Step 5 — UI polish and features
- Add city labels, country flags (small bitmaps), and daylight icons.
- Show date and weekday under each clock.
- Add color-coding for business hours vs. off-hours.
- Add an alarm or notification tied to a specific zone.
- Implement auto-brightness using a light sensor for nighttime dimming.
- Save user configuration (Wi‑Fi, zones) to SPIFFS or LittleFS.
Step 6 — Enclosure and final assembly
- Cut or 3D-print the front plate with openings for the display and any LEDs or buttons.
- Mount the display securely using standoffs; route power cable through back.
- If using analog faces, mill holes and fit quartz movements behind each face.
- Apply finishing touches: paint, bezel trim, and wall-mount keyhole slots.
Troubleshooting tips
- No Wi‑Fi/NTP: verify credentials, check signal strength, fall back to RTC.
- Wrong timezone/DST: confirm IANA names and that tzset is applied before localtime calls.
- Display artifacts: ensure correct SPI wiring, and use proper display init settings for the chosen library.
- Power issues: use a stable 5V supply rated for the display and ESP32 peak current.
Variations and scaling
- Desktop version: smaller OLED, battery power, collapsible stand.
- Large public display: Raspberry Pi with full IANA database and web-based configuration panel.
- Multi-zone analog: use synchronized battery quartz movements and millimeter-precision face alignment.
- Mobile app companion: control displayed zones, set alarms, or push calendar events to the clock.
Example parts list (basic ESP32 + TFT build)
- ESP32 dev board — $6–12
- 2.8”–3.5” TFT display — $8–20
- DS3231 RTC module — $3–8 (optional)
- Enclosure materials — $5–40 depending on wood/3D print
- Misc: wires, standoffs, screws — $5–10
Total: typically $30–80 depending on choices.
Final notes
Building an international clock is a flexible project: start simple with a 4-zone digital display and add features (NTP syncing, DST automation, alarms, and nicer enclosures) as you grow more comfortable. It’s a practical tool and a great way to learn about timekeeping, embedded systems, and user-centered design.
Leave a Reply