Unix Timestamps Explained: Seconds vs. Milliseconds, Leap Seconds, and the 2038 Problem
A DEV Community guide breaks down Unix time, which counts elapsed seconds since the 1970 epoch and ignores timezones and calendar quirks. It highlights a common microservice bug where 10-digit second-based values are mixed with 13-digit millisecond values, leading to absurd dates like the year 58,742. The article explains how leap seconds can cause out-of-order events in high-frequency systems and how NTP smearing is used to mitigate this. It also covers the origins of the 1970 epoch in early Unix development and warns that 32-bit systems will overflow in January 2038. The piece closes with practical guidance on storage and migration planning.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in