What Is the Unix Epoch?

The Unix epoch is the reference instant from which common Unix timestamps count. It is 00:00:00 UTC on 1 January 1970.

Unix Epoch: 1970-01-01, Reference date; 00:00:00, Reference time; UTC, Time standard.

A common zero point

A count needs a starting point. For Unix-style time, that point is the beginning of 1970 in UTC. The instant is called an epoch because it begins a system for numbering time. A timestamp of zero refers to the epoch itself; positive values refer to later moments, and negative values can refer to earlier ones.

For example, the Unix timestamp 1700000000 counts 1,700,000,000 seconds forward from the epoch under the commonly used seconds convention. That corresponds to 14 November 2023 at 22:13:20 UTC. The same instant has different local clock readings in different zones, but the epoch reference does not change.

Why 1970?

The date became associated with Unix as the operating system and its time conventions developed in the late 1960s and early 1970s. The epoch is a practical computing convention, not a claim that time or calendars began in 1970. Software can represent many dates before and after it, subject to that system's range and rules.

It is often said that the epoch was selected because it was a convenient round starting date. Historical accounts describe the choice as part of early Unix development, but the exact reasoning is less important to users than the resulting contract: know which epoch and unit a value uses. Other computer systems can choose different origins or encodings.

Number line for a signed 32-bit Unix timestamp: −2,147,483,648 is 1901-12-13 20:45:52 UTC, 0 is 1970-01-01 00:00:00 UTC and 2,147,483,647 is 2038-01-19 03:14:07 UTC, after which the value wraps to the minimum.
Why 19 January 2038 matters: a signed 32-bit count of seconds runs out at 03:14:07 UTC.

Epoch versus timestamp

The epoch is the fixed reference instant. The timestamp is the value measured from that reference. An analogy is a measuring tape: the zero mark is like the epoch, while a measurement is like a timestamp. Confusing the two leads to errors when reading technical documentation.

Not every number near ten digits is necessarily a Unix timestamp. It might be an identifier, a counter or a value using a different unit. Look at the field name, documentation and context. Common formats include seconds and milliseconds; JavaScript uses milliseconds for its built-in date values.

Why this convention is useful

Once two moments are expressed as counts on the same timeline, software can compare them and compute a difference with simple arithmetic. It can sort events and determine durations without repeatedly interpreting regional date formats. The timestamp still needs to be formatted for humans, and that display step requires choices about calendar, locale and time zone.

Unix timestamp conventions also simplify data exchange, but do not assume every system handles old dates, leap seconds or numeric limits identically. Confirm the receiving system's expectations before moving timestamps between languages or databases.

Other systems can have other epochs

The word “epoch” does not always mean 1 January 1970. It is the reference instant chosen by a particular time representation. A software library may count days from one origin, seconds from another, or use a calendar year and day number instead. Always read the field's documentation before interpreting a numeric value.

Even when two systems both use seconds, their numbers are not interchangeable if their origins differ. Converting requires knowing the source and destination epochs, units, signedness and any special time-scale conventions. A value can look plausible while being years or centuries away from its intended date.

Dates before and after the epoch

Unix time can represent dates before its origin with negative values, if the language and storage type support them. Negative values can expose edge cases: some programming languages round negative fractional seconds differently, and some database types have narrower historical ranges. Test the actual conversion functions for the dates an application must support.

Modern systems generally use wider integer representations than early computers, but older signed 32-bit representations of seconds encounter a limit in January 2038. A 32-bit signed count cannot continue indefinitely, so the value can overflow unless the system uses a wider representation or another strategy. This is commonly called the Year 2038 problem. It is a property of a particular storage width, not an end date for Unix timestamps themselves.

The epoch is not a calendar

The epoch fixes one starting instant. It does not specify how every historical date should be written, which local time zone should be used, or which calendar convention applies to dates before modern records. A timestamp needs a unit and a time scale; a readable date needs calendar and display rules too.

When investigating legacy data, record the assumptions alongside the conversion: epoch, unit, whether the number is signed, and what the resulting date is meant to represent. This makes later debugging much easier than relying on a guess based on digit length.

Read the companion guide What Is a Unix Timestamp? or try converting a value with the timestamp converter.

Sources and further reading