What Is Unix Time?

Unix time counts the seconds since the epoch: 00:00:00 UTC on 1 January 1970. The date has no cosmic significance — it was simply a convenient round number chosen by the developers of Unix at Bell Labs in the early 1970s. Five decades later it is the de-facto standard for machine timekeeping: file modification times, database rows, JWT expiries, log lines and HTTP caches all speak epoch.

Its appeal is that a timestamp is just an integer. Comparing, sorting and subtracting times become integer operations, and the value means the same instant everywhere on Earth — timezones only enter the picture when a time is displayed to a human. Try it live in our epoch converter.

The Year 2038 problem

Early Unix stored the counter in a signed 32-bit integer, which holds a maximum of 2,147,483,647. That count is reached at 03:14:07 UTC on 19 January 2038; one second later the value wraps negative and a vulnerable system believes it is 13 December 1901. Modern 64-bit systems are safe for roughly 292 billion years, but 32-bit values survive in embedded devices, old file formats, database column types and binary protocols — making 2038 a slow-motion, smaller-scale sequel to Y2K. Auditing for 32-bit time storage is the entire fix.

Leap seconds

Earth's rotation drifts relative to atomic clocks, so UTC occasionally inserts a leap second. Unix time pretends these don't exist: every day is exactly 86,400 seconds. During a leap second the clock either repeats a second or, in large fleets, "smears" it across the surrounding hours. The benefit is arithmetic simplicity; the cost is that subtracting two Unix timestamps across a leap second is off by one physical second — irrelevant for almost everything except scientific timekeeping.

Common units

Seconds are standard, but JavaScript's Date.now() returns milliseconds, and high-resolution tracing uses microseconds or nanoseconds. A timestamp's digit count usually reveals its unit — 10 digits today means seconds, 13 means milliseconds. Get the current epoch in Python, JavaScript, Go and 17 other languages.

FAQ

What is Unix time?

Unix time (epoch time) is the number of seconds elapsed since 00:00:00 UTC on 1 January 1970, excluding leap seconds. It represents any instant as a single integer that is identical in every timezone.

What is the Year 2038 problem?

Systems storing Unix time in a signed 32-bit integer overflow at 03:14:07 UTC on 19 January 2038, when the count exceeds 2,147,483,647. Affected systems wrap to a negative number and read the date as December 1901. The fix is storing time in 64-bit integers, which modern operating systems already do.

Does Unix time include leap seconds?

No. When a leap second occurs, Unix time repeats or smears a second rather than counting it, keeping every day exactly 86,400 Unix seconds. This makes arithmetic simple but means Unix time is not a strict count of elapsed physical seconds.