The bug wasn’t in the code. It was buried in history.
Every developer has a favorite edge case. Mine involves a birthday, a “bug”, and a timezone that no longer exists.
Years ago, my colleague B and I supported a patient registration system for a healthcare group. One day, a tech-support case landed on our desk: a patient’s age was off by one year. He’d been admitted on his birthday, so the math should’ve been simple. But it wasn’t.
We double-checked the form logic, the database, the timezone settings. Everything looked fine. Yet the age calculation stubbornly refused to match our reality.
Then I had a brainwave. The patient was born in Singapore during the Japanese occupation. At that time, Singapore’s timezone was GMT+9 – aligned with Tokyo. Our system used Joda-Time, which – of course – faithfully captured Singapore’s wartime timezone. Why wouldn’t it? He was born just after midnight, but in today’s timezone, that would’ve been the previous day. The system was right. So was our human reckoning.
Here’s the relevant excerpt from the timezone database, taken from Mok Ly Yng’s research:
# Singapore
# taken from Mok Ly Yng (2003-10-30)
# https://web.archive.org/web/20190822231045/http://www.math.nus.edu.sg/~mathelmr/teaching/timezone.html
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Singapore 6:55:25 - LMT 1901 Jan 1
6:55:25 - SMT 1905 Jun 1 # Singapore M.T.
7:00 - %z 1933 Jan 1
7:00 0:20 %z 1936 Jan 1
7:20 - %z 1941 Sep 1
7:30 - %z 1942 Feb 16
9:00 - %z 1945 Sep 12
7:30 - %z 1981 Dec 31 16:00u
8:00 - %zIt was a reminder that software doesn’t just live in the present – it carries the weight of history. Timezones aren’t just technical abstractions or constructs derived from pure physics; they’re geopolitical artifacts. And sometimes, they reach out from the past to mess with you.
🧩 Footnote
If you’re using Joda-Time or any modern timezone-aware library, historical offsets like these are baked into the tz database. But they only matter when you’re dealing with real-world data – especially birthdates, legal timestamps, or anything that crosses geopolitical boundaries.

Leave a Reply