Unix Timestamps Explained: What the Numbers Mean and Why They Exist

A Unix timestamp is just a very large number β€” but that number is exactly why computers handle dates so reliably.

Unix time counts seconds since a fixed starting point

Unix time counts seconds elapsed since midnight UTC on January 1, 1970 β€” commonly called "the epoch." Every moment in history maps to exactly one integer, regardless of what timezone you're in when you read it.

Seconds vs. milliseconds is a constant source of bugs

Many system-level tools use seconds, while many web and JavaScript APIs use milliseconds. The same instant in time can look exactly 1,000 times larger or smaller depending on which convention a given system expects, which is one of the most common timestamp bugs in practice.

A raw timestamp carries no timezone

The number itself doesn't encode a timezone at all β€” timezone only enters the picture when converting the number into a human-readable calendar date. That's exactly what makes timestamps convenient for storing and comparing times across different regions consistently.

Timestamps usually pair with ISO 8601 for display

Raw timestamps are commonly converted to and from ISO 8601 format (like 2026-09-21T00:00:00Z) for human-readable display, since ISO 8601 is both easy for machines to parse and easy for people to read.

Dates before 1970 use negative numbers

Moments before the epoch are represented as negative integers, and the format extends cleanly far into the future β€” though some older systems impose hard technical limits.

The Year 2038 problem

Systems that store Unix time as a signed 32-bit integer will overflow on January 19, 2038. This is a known limitation, sometimes compared to Y2K, that specifically affects older software and some embedded or legacy systems still using 32-bit time storage.

Why software uses a giant number instead of a calendar date

Storing time as a single integer rather than a structured date object makes comparing two moments, sorting a list of events, and calculating elapsed time (like "how many seconds passed between these two events") a simple arithmetic operation instead of a calendar-aware calculation. It also sidesteps timezone and calendar-format ambiguity entirely, until the exact moment a human actually needs to read the value.

Where you'll actually run into raw Unix timestamps

Log files, database records, API responses, URL parameters, and cookie expiration values commonly store time as a raw Unix number rather than a formatted date string, precisely because it's compact, unambiguous, and easy to compare. Converting that raw number into something readable is one of the most routine tasks in software development.

Frequently Asked Questions

Why does my timestamp look wrong by exactly 1,000x?

This is almost always a seconds-vs-milliseconds mismatch. Multiply or divide the value by 1,000 depending on which format the receiving system actually expects.

Does a Unix timestamp change if I'm in a different timezone?

No β€” the underlying number is identical everywhere in the world for the same instant. Only the human-readable date and time string shown from it changes, based on which timezone gets applied during the conversion.