What Is a Unix Timestamp?

A Unix timestamp is the count of seconds elapsed since January 1, 1970, 00:00:00 UTC—the “Unix epoch.” It is timezone-independent: 1,700,000,000 represents the same instant everywhere on Earth. As of 2025, Unix timestamps are in the 1.7 billion range and increasing by 86,400 each day.

Common Uses in Software

Timestamps appear in databases, log files, REST APIs, and session tokens. JSON APIs frequently return dates as timestamps because they are unambiguous and easy to compare or sort. Subtracting two timestamps gives the exact elapsed seconds regardless of daylight saving time changes or leap seconds (most Unix implementations ignore leap seconds).

The Year 2038 Problem

32-bit signed integers max out at 2,147,483,647, which corresponds to January 19, 2038, 03:14:07 UTC. Legacy systems still storing timestamps as 32-bit integers will overflow at that point. Most modern systems use 64-bit integers, pushing the overflow date to approximately the year 292 billion—not a near-term concern.

Frequently Asked Questions

What is the Y2K38 problem?

On January 19, 2038 at 03:14:07 UTC, 32-bit signed integers storing Unix timestamps will overflow — the value wraps from the maximum positive number to a large negative, causing apparent dates to jump to December 13, 1901. Systems using 64-bit integers (the default in most modern software) are unaffected; 64-bit Unix time won’t overflow for roughly 292 billion years.

Do timestamps account for leap seconds?

No. Unix timestamps assume exactly 86,400 seconds per day and do not track leap seconds. A Unix timestamp-to-UTC conversion can therefore differ from actual elapsed SI time by the accumulated leap second count (27 as of 2024). For scientific applications requiring leap-second accuracy, use TAI (International Atomic Time) rather than Unix time.