Developer Time · Explainer
Unix Epoch Time Explained (and Why It Starts in 1970)
Every Unix timestamp — every log line, every database row, every API response — is secretly a count of seconds from one specific instant. Here is what that instant is, why it's 1970, and what happens at its edges.
Key takeaways
- The Unix epoch is
00:00:00UTC on 1 January 1970 — the zero point every Unix timestamp counts from. - Unix time isn't a calendar date; it's a single number of seconds elapsed since that instant, which is what makes date arithmetic on computers just subtraction.
- The date was picked for practical reasons, not any historical significance — it kept the numbers small on early, memory-limited hardware.
- POSIX time ignores leap seconds, so it's a simplified count, not a perfectly continuous measure of physical time.
- A negative timestamp is a valid date before 1970; a 32-bit signed count of seconds runs out at
03:14:07UTC on 19 January 2038. - The unit isn't always seconds — JavaScript and Java count epoch milliseconds, which trips up a lot of code that expects seconds.
Open a database row, a server log, or a JSON payload from almost any API, and somewhere you'll find a timestamp that looks like 1735689600 — a bare, unlabeled integer with no year, month, or colon in sight. That number is Unix time: a running count of seconds since one fixed moment, chosen more than fifty years ago, that quietly underpins how nearly every computer on Earth keeps track of "when."
This piece is specifically about that fixed moment — the epoch itself: what the word means, why it lands on 1 January 1970, how the count behaves at its edges, and where it breaks. For the mechanics of turning a specific timestamp into a calendar date, the conversion guide covers that step by step; for the broader shape of a Unix timestamp as a data type, see what a Unix timestamp is.
01What "epoch" actually means
In everyday English, an "epoch" is a long stretch of history. In computing, the word means something narrower and much more precise: a single reference point in time, fixed by convention, from which a system measures every other moment as an offset. It isn't a duration — it's a marker, the "zero" on a number line that runs in both directions.
Unix time is only one epoch among several used in computing (more on the others below), but it's by far the most common, because it underlies POSIX — the specification that most Unix-like operating systems, and the languages built on top of them, implement. When a system says a file was modified at timestamp 0, it means exactly one thing: the epoch itself, with zero seconds added.
02Why January 1970, specifically?
There's no event of historical significance tied to 00:00:00 UTC on 1 January 1970 — nothing happened that day that made it worth immortalizing. The date was a practical decision made by the engineers building Unix at Bell Labs in the early 1970s, and by most accounts it came down to convenience: it was a recent, round date at a time when memory was scarce and every bit used to store a time value was a bit that couldn't be used for something else. Starting the count near the present, rather than at some earlier "meaningful" year, kept the numbers smaller for longer.
It also wasn't the operating system's original choice. Early Unix measured time in 60ths of a second using a 32-bit unsigned counter, which could only span roughly two and a half years before wrapping around — so the reference point had to sit close to the present just to avoid immediate overflow. Once Unix moved to counting whole seconds instead, that constraint eased, and the epoch settled on 1 January 1970, a choice first written down in the Unix Programmer's Manual in the early 1970s and never revisited since.
It has to be UTC, not a local time zone
The epoch is defined in Coordinated Universal Time, not any local clock. A Unix timestamp is one universal number for a single instant; the same value reads as 00:00:00 in London and as an earlier evening hour in New York, but it's the same moment underneath. Local time only enters when the number is displayed.
03How the count actually works
A Unix timestamp is the number of seconds that have elapsed since the epoch, and the arithmetic is deliberately simple: every real second that passes, the count goes up by exactly one. There's no month length to account for, no leap year to check, no time zone offset to apply — that's the entire point of representing time this way. Comparing two moments, or measuring a duration, becomes a single subtraction between two integers instead of calendar math.
Underneath that simplicity sits one quiet approximation: POSIX defines the relationship between a calendar date and its epoch seconds by assuming every day is exactly 86,400 seconds long. In reality, the length of a day drifts very slightly, and every so often a leap second is inserted into UTC to keep clocks aligned with the Earth's rotation. Unix time doesn't count those extra seconds — when a leap second occurs, most systems either repeat a second or smear it across the surrounding time, rather than letting the epoch count tick past what the formula expects. The practical effect for most software is negligible, but it means Unix time is a simplified, calendar-derived count rather than a literal tally of physical seconds.
04The epoch, right now
Seeing the number move helps it click. Below is the Unix timestamp for this exact moment, ticking up by one every second, alongside the UTC date and time it corresponds to.
Live epoch clock
Reading your device's clock…
Want to convert a specific timestamp?
This is a live view of "now," not a converter. To turn any timestamp into a readable date (or the reverse), use the epoch converter or the Unix timestamp converter.
05Before the epoch: negative time
Because the epoch is just a reference point and not a "beginning," the count is allowed to run backward. A negative Unix timestamp — something like -86400, one full day before the epoch — represents a valid date before 1 January 1970. Subtracting seconds from zero works exactly the same way as adding them, so timestamps for historical dates, birth years before 1970, or any pre-epoch record can be stored as ordinary negative integers.
In practice, support is uneven. Many programming languages and database engines handle negative epoch values correctly, but plenty of tools, embedded devices, and older APIs were only ever tested against positive timestamps and will reject or mishandle a negative one. If a system needs to represent dates well before 1970 — genealogical records, for instance — it's worth checking that negative timestamps are actually supported rather than assuming they are.
06Seconds, milliseconds — the unit trap
The epoch itself never changes, but the unit used to count from it does, and mixing them up is one of the most common bugs involving timestamps. Most Unix system calls, Python's time.time(), and Ruby return epoch seconds — a 10-digit number in the current era. JavaScript's Date.now() and Java's System.currentTimeMillis() return epoch milliseconds instead — a 13-digit number, exactly 1,000 times larger for the same instant. Some logging and analytics systems go further and use microseconds or nanoseconds.
The tell is the number of digits. As of 2026, a correct epoch-seconds value is 10 digits long; an epoch-milliseconds value for the same moment is 13 digits. A date that computes to sometime in the year 50,000, or to 1970 when it should be recent, is almost always a units mismatch — a seconds value read as milliseconds, or vice versa — not a genuine bug in the epoch logic itself. For millisecond-specific handling, see milliseconds to time.
07The Year 2038 problem
Storing a growing count of seconds requires a data type with a finite size, and the type chosen by many historical systems — a signed 32-bit integer — can only represent whole numbers up to 2,147,483,647. Counting seconds from the 1970 epoch, that ceiling is reached at 03:14:07 UTC on 19 January 2038. One second later, the value overflows and wraps around to a large negative number, which an unpatched 32-bit system reads back not as an error but as a specific, wrong date: 13 December 1901.
This is the Year 2038 problem, and it's a direct consequence of the storage format, not the epoch concept itself — the fix is switching the underlying time type from a 32-bit to a 64-bit integer, which pushes the next overflow roughly 292 billion years into the future. Most current 64-bit operating systems and modern language runtimes have already made this switch; the remaining risk sits in older embedded systems, legacy databases, and file formats that still store time in 32 bits and are harder to update.
It isn't purely theoretical
Systems that project dates forward — mortgage schedules, long-term certificates, calendar recurrences — can compute a post-2038 date today and hit the overflow years before the clock itself reaches 2038. Auditing which components still use a 32-bit time_t is worth doing well ahead of the date, not on it.
08Not every system uses 1970
Unix time is the most widely used epoch, but it isn't the only one. Other platforms picked their own zero points, for their own reasons, and none of them convert to Unix time by a simple offset unless you know the exact rule.
| System | Epoch start | Unit |
|---|---|---|
| Unix / POSIX | 1 Jan 1970, 00:00:00 UTC | Seconds |
| Network Time Protocol (NTP) | 1 Jan 1900, 00:00:00 UTC | Seconds |
| Windows FILETIME | 1 Jan 1601, 00:00:00 UTC | 100-nanosecond intervals |
| GPS time | 6 Jan 1980, 00:00:00 UTC | Seconds (no leap seconds) |
| Microsoft Excel (1900 system) | 0 Jan 1900 (serial day 1) | Days |
.NET DateTime | 1 Jan, year 1, 00:00:00 | 100-nanosecond "ticks" |
Windows' 1601 start date is its own small piece of trivia: it's the beginning of the 400-year Gregorian calendar cycle that includes 1970, chosen so the math for leap years repeats cleanly. When timestamps from two different systems need to be compared, the safest approach is to convert both into calendar date and time first — using each system's stated epoch and unit — rather than assuming the raw numbers share a scale.
09Where you'll actually run into it
Epoch timestamps show up anywhere a system needs to store "when" compactly and compare it cheaply: database created_at and updated_at columns, HTTP cache headers, JWT expiry fields, log lines, file metadata, and the internals of almost every date library. They're popular precisely because a single integer sorts, compares, and stores more efficiently than a structured date, and because they sidestep time zones entirely until the moment something needs to be displayed to a person.
That last part matters for formatting, too: once you have an epoch value and want to hand it to a reader, it eventually needs to become a calendar date, and often a 12-hour or 24-hour clock time and even a standardized text format like ISO 8601. Scheduled jobs are the other common meeting point — a cron expression describes when a task should run in calendar terms, but the system checking "is it time yet" is usually comparing against the current epoch value underneath.
Convert any epoch timestamp instantly
Paste in a Unix timestamp and get the exact UTC and local date and time back — free, no sign-up.
10Frequently asked questions
What date does Unix time start counting from?
Unix time starts counting from 00:00:00 UTC on 1 January 1970. That instant is Unix second zero, called the epoch — every Unix timestamp is a count of seconds forward (or backward) from it.
Why was 1 January 1970 chosen as the epoch?
It was an arbitrary but practical choice made by Bell Labs engineers designing Unix in the early 1970s. It was a recent, round date at the time, which kept the numbers small on memory-limited hardware and made date arithmetic a simple subtraction instead of calendar math.
Does Unix time count leap seconds?
No. POSIX time assumes every day has exactly 86,400 seconds and ignores leap seconds, so it is not a perfectly continuous count of physical seconds elapsed — it is a simplified count derived from the calendar date and time of day.
Can a Unix timestamp be negative?
Yes. A negative Unix timestamp represents a date and time before 1 January 1970 UTC. The arithmetic works the same way in both directions, though not every system or library accepts negative values.
What is the Year 2038 problem?
Systems that store Unix time in a signed 32-bit integer will overflow at 03:14:07 UTC on 19 January 2038. The count wraps around to a large negative number, which such systems read back as a date in December 1901 instead. The fix is storing time in 64 bits instead of 32.
Is a Unix timestamp always measured in seconds?
The epoch is always the same instant, but the unit varies by platform. Python, Ruby, and most Unix system calls return epoch seconds, while JavaScript's Date.now() and Java's System.currentTimeMillis() return epoch milliseconds — a difference of a factor of 1,000 that is a common source of bugs.