All guides

What is Unix time? A plain-English guide to epoch timestamps

Updated

Unix time — also called epoch time, POSIX time or a Unix timestamp — is a way of describing a moment as a single number: the count of seconds that have passed since 00:00:00 UTC on Thursday, 1 January 1970. That starting instant is known as the Unix epoch.

At the moment you read this the number is a little under two billion. It goes up by exactly one every second, everywhere on Earth at the same time, regardless of time zone or daylight saving. That simplicity is the whole point.

Why represent time as a number?

Human date formats are messy. “03/04/2025” is 3 April in the UK and 4 March in the US; “9:00” means nothing without a time zone; months have different lengths. A single integer avoids all of that:

  • Comparing is trivial. A larger number is always later, so sorting events is just sorting numbers.
  • Arithmetic is trivial. One hour later is +3600; one day later is +86400; the gap between two events is a subtraction.
  • It’s unambiguous. A timestamp always refers to one instant in UTC. Displaying it in a local time zone is a separate, final step.
  • It’s compact. It fits in a 64-bit integer column, a log line or a URL parameter.

Why 1 January 1970?

Unix was developed at Bell Labs at the end of the 1960s. Early versions experimented with different units and starting points, and by the mid-1970s the system had settled on whole seconds counted from the start of 1970 — a round, recent date that made the numbers small and easy to reason about. Because so much software descends from or interoperates with Unix, that choice became the de facto standard for computing in general.

Some useful reference points

TimestampMoment (UTC)Why it matters
01970-01-01 00:00:00The Unix epoch
864001970-01-02 00:00:00Exactly one day
10000000002001-09-09 01:46:40The first 10-digit timestamp
12345678902009-02-13 23:31:30A famous "nice number" moment
17356896002025-01-01 00:00:00Start of 2025
20000000002033-05-18 03:33:20Two billion seconds
21474836472038-01-19 03:14:07Largest signed 32-bit value

You can paste any of these into the converter to check them, or try your own.

Times before 1970

Moments before the epoch are simply negative numbers. -86400 is midnight UTC on 31 December 1969, and -1 is one second before the epoch. Most modern languages and databases handle negative timestamps correctly, although some older systems and file formats treat timestamps as unsigned and cannot represent them.

Unix time and leap seconds

The Earth’s rotation is slightly irregular, so since 1972 timekeepers have occasionally inserted a leap second into UTC to keep clocks aligned with the sky — 27 of them so far, the most recent at the end of 2016.

Unix time deliberately ignores them. By definition every day in Unix time is exactly 86,400 seconds long, so a timestamp is not a strict count of elapsed SI seconds; it is a count that pretends leap seconds never happened. When one occurs, systems either repeat a second or “smear” the extra second across several hours. For almost all applications this makes no practical difference, and it keeps date arithmetic simple. In 2022 the international body responsible for UTC voted to stop adding leap seconds by 2035.

Seconds are not the only unit

The classic Unix timestamp counts whole seconds, but many systems need finer resolution and count milliseconds, microseconds or nanoseconds since the same epoch instead. JavaScript’s Date.now(), for example, returns milliseconds. Mixing these up is one of the most common timestamp bugs — see how to tell the units apart.