How We Test Time Accuracy

Every number on WorldTimeWise — every converted time, every DST date, every sunrise — is produced by code that is checked against known answers before it ever reaches you. This page shows what we test and the real results from our latest test run.

What "known answers" means

A known answer is a fact we can verify independently of our own code. For example: we know from official US law that daylight saving time in 2026 begins on March 8 and ends on November 1. Our test suite asks the code the same question and fails the build if the answer differs. If a government changes its rules, the IANA database updates, and our tests confirm the new answers.

Test categories and real counts

Our automated suite runs 150 tests across 8 files. Every one passes on every build. Here is what each file covers:

Test suite breakdown by file
Area Tests What it verifies
Date math 49 Leap years, ISO week numbers, day-of-year, days-between, weekday calculations, month lengths
Time zones & DST 21 UTC offsets, DST detection, spring-forward/fall-back transitions, ambiguous and nonexistent local times
Timer events 21 Countdown/timer/stopwatch state transitions and event handling
Holidays 20 US federal holiday dates including observed-weekday rules
Sun & moon 13 Sunrise/sunset ordering, polar day/night detection, moon phases, full/new moon prediction
Timer formatting 13 Duration display, unit labels, zero-padding
DST data generation 9 2026 transition dates for 30 zones computed from IANA rules
Clock ticker 4 Shared timer alignment, formatter caching, change detection

Key known answers we verify

These are the anchor facts our tests check on every build:

  • US daylight saving 2026: begins Sunday, March 8, 2026; ends Sunday, November 1, 2026.
  • UK/EU daylight saving 2026: begins Sunday, March 29, 2026; ends Sunday, October 25, 2026.
  • London–New York gap: normally 5 hours; 4 hours during the mismatch windows (March 8–29 and October 25–November 1, 2026).
  • India (Asia/Kolkata): UTC+05:30 all year, no daylight saving — 10.5 hours ahead of New York in US standard time, 9.5 hours in US daylight time.
  • DST edge cases: 2026-03-08 02:30 does not exist in New York (skipped hour); 2026-11-01 01:30 happens twice (repeated hour).
  • Leap years: 2000 and 2024 are leap years; 2100 is not.
  • ISO weeks: 2027-01-01 falls in ISO week 2026-W53.

What tests can't catch

Tests verify our logic against known rules, but the rules themselves come from the IANA database shipped in your browser. If a government announces a last-minute time zone change and your browser hasn't updated yet, our pages will reflect the older rules until the update arrives. We also can't verify your device's clock is correct — see the note below.

Your device clock matters

The live clocks on this site tick from your device's clock. If your device is set wrong, the times will be wrong too — our math is only as good as its starting point. We run a quiet check: on page load we compare your device time to our server's time, and if they differ by more than 5 seconds we show a small notice. Nothing is tracked or sent anywhere; the comparison happens entirely in your browser.

Report an error

Found a time that looks wrong? We want to know. Tell us the page, the date, the time zone, and what you expected — contact us and we'll investigate. Every report helps the tests get better.

Read our full methodology →