Practical writing about Unix epochs, ISO 8601, timezone bugs, specialty formats, and other date-related topics. Updated periodically.
GPS satellites broadcast time 18 seconds ahead of UTC. The offset isn't a bug — it's a deliberate design choice with real consequences for any code that converts between them.
Five real timezone bugs I have seen ship to production. The fix is usually small. Finding it is what costs you the afternoon.
A 32-bit timestamp column will overflow on January 19, 2038. That sounds far away. For systems that compute future dates more than 13 years out, the bug is already here.
When you inspect a Chrome history database, an iOS backup, or a Windows event log, the timestamps inside use different epochs from Unix time. Knowing which is which saves hours.
You call Date.now() twice in a row. The second value is smaller. This is not a hardware bug — it is documented JavaScript behavior, and it can break your code in production.
Excel has thought 1900 was a leap year since 1985. It is not. Microsoft has known about the bug for decades. It is still active in Excel 365. Here is why.
You have a log file. You want the timestamps out of it. Here are ten regexes that work, with the gotchas for each one.
Sydney and Brisbane both look like UTC+10 in spring. In winter, Sydney is UTC+11 and Brisbane is still UTC+10. They are different timezones — and your code needs to know.
Should you store timestamps as seconds, milliseconds, or higher precision? Here is a pragmatic answer that holds up across most use cases.
Date inputs are deceptively hard. The default browser controls have bugs. The popular libraries have bugs. Your custom implementation will have new bugs. Here is how to choose your tradeoffs.