Guide

Unix time (epoch time) explained

Updated 13 July 2026 Part of Time & Dates

Unix time, or epoch time, represents a moment as a running count of seconds from the Unix epoch, the fixed reference instant used by Unix-style systems. Computers use it because a plain number is easier to store, compare and sort than a calendar date written in words. To read it as a normal date and time, software interprets that count against the epoch, then applies calendar rules and, if needed, a time zone.

How Unix time works

A Unix timestamp is not a date format in the usual sense. It does not contain a month name, a weekday, or a time zone label. It is a compact measurement of elapsed time from a shared starting point.

That design came from the early Unix operating system, where timestamps had to be simple enough for files, programs and system tools to handle reliably. A number can be compared quickly: a larger timestamp is later, a smaller timestamp is earlier. That makes Unix time useful in log files, databases, APIs, file systems and many programming languages.

The epoch itself is the agreed reference point. The timestamp tells you how far a moment sits from that point. Values after the epoch move forward. Values before it can be represented in systems that allow signed values.

Unix time is usually discussed in relation to UTC, the global time standard used for civil timekeeping. Local time is a display choice added later. The same Unix timestamp can appear as different clock times in different places, because time zones change how the moment is shown, not which moment it is.

How to convert Unix time to a readable date

The safest way to convert Unix time is to use a date and time library in your programming language, spreadsheet, database or command-line tool. Give the tool the timestamp, tell it whether you want UTC or a local time zone, and it will return a human-readable result.

That matters because calendar time is not just division. Months have different lengths. Leap years affect the calendar. Time zones have political rules, and some regions change clocks during the year. A hand calculation can seem simple for rough intuition, but production software should let a tested time library do the conversion.

The conversion also works in the other direction. A program can take a readable date and time, interpret it in a stated time zone, and return the matching Unix timestamp. If the time zone is missing, results can differ between systems, because the same written clock time may refer to different real moments around the world.

How Unix time differs from other epochs

Unix time is only one epoch-based system. Network Time Protocol, often called NTP, uses its own reference point and is designed for synchronising clocks across networks. GPS time also uses a separate epoch and its own way of counting time for satellite navigation.

These systems can all describe time, but their reference points and rules are not interchangeable. When data moves between systems, the key question is not just “what is the timestamp?” but “which time scale and epoch produced it?” Mixing them without conversion can shift the result by a large amount.

The Year 2038 problem

The Year 2038 problem affects older or constrained systems that store Unix time in a field too small to keep counting safely beyond a certain point. When that limit is reached, the stored value can overflow and be misread as a different time.

Modern systems often avoid this by using wider timestamp storage, but legacy software, embedded devices and old file formats can still matter. The practical lesson is simple: when timestamps need to last, check the storage type as well as the date format.