Unix Epoch Time Explained: What the Timestamp Actually Means
Developers · 6 min · Published March 28, 2026
Every system from Unix servers to JavaScript timestamps to IoT sensors speaks in epoch time. It\'s the number of seconds (or milliseconds) since "the epoch" — midnight UTC on January 1, 1970. Understanding it demystifies server logs, API responses, and one of computing\'s most famous bugs.
What Is Epoch Time?
Epoch time (also Unix time, POSIX time, or Epoch seconds) is a way to represent any moment as a single number. The zero point is:
January 1, 1970 · 00:00:00 UTC
Every second after that is the epoch number. So:
- 0 = Jan 1, 1970, 00:00:00 UTC
- 1 = Jan 1, 1970, 00:00:01 UTC
- 86,400 = Jan 2, 1970, 00:00:00 UTC (24 hours × 60 × 60)
- 1,713,100,800 = Apr 15, 2024, 00:00:00 UTC
Use our time converter to try it.
Why 1970?
Arbitrary choice. In the 1970s when Unix was designed, Jan 1, 1970 was chosen as a clean reference point. It\'s now locked into billions of systems worldwide — changing it would be apocalyptic.
Seconds vs. Milliseconds
Unix timestamp (seconds): 1,713,100,800 for Apr 15, 2024, 00:00:00 UTC. Used in databases, Python, C, Linux.
JavaScript timestamp (milliseconds): 1,713,100,800,000. JavaScript added three zeros. The same moment but with millisecond precision. If you\'re pasting a JavaScript timestamp into a Unix tool, delete the last three digits.
Timezone & UTC
Epoch time is always in UTC — no timezone. It\'s a universal reference. When you convert epoch 1,713,100,800 to a human date, it becomes different local times in different places:
- UTC: Apr 15, 2024 · 00:00:00
- IST (UTC+5:30): Apr 15, 2024 · 05:30:00
- US Eastern (UTC−4 in summer): Apr 14, 2024 · 20:00:00
The epoch number never changes; only the human-readable representation does. This is why servers always store times as epoch (unambiguous) and convert to local time only for display.
The Year 2038 Problem
A 32-bit signed integer can store numbers up to 2,147,483,647. In epoch seconds, that corresponds to:
January 19, 2038 · 03:14:07 UTC
After that second, old systems using 32-bit epoch will overflow and wrap around to 1901 — or crash. Much modern code has migrated to 64-bit timestamps (which will overflow in the year 292 billion), but embedded systems and legacy databases still use 32-bit. When 2038 arrives, they\'ll need quick fixes.
Leap Seconds
UTC occasionally adds a leap second ("+1 second" at the end of a day) to keep atomic time synchronized with Earth\'s rotation. Epoch timestamps don\'t officially account for this — some systems count the leap second, others skip it, leading to temporary desynchronisation. Most developers ignore it and rely on NTP (Network Time Protocol) to resync.
Reading Epoch Timestamps in the Wild
Logs and APIs often embed epoch timestamps. A 10-digit number like 1,713,100,800 is likely epoch seconds. A 13-digit number like 1,713,100,800,000 is likely JavaScript milliseconds.
Example API response:
{
"id": 12345,
"created_at": 1713100800,
"name": "Sample Event"
}
That "created_at" is epoch seconds. Convert it with our converter → Apr 15, 2024, 00:00:00 UTC.
Converting Epoch Back to Human Date
Formula in many languages:
- Python:
from datetime import datetime; datetime.utcfromtimestamp(1713100800) - JavaScript:
new Date(1713100800000)(note: milliseconds, so multiply by 1000) - Unix shell:
date −d @1713100800
Or use our converter.
When Epoch Matters
- Distributed systems need a universal reference time — epoch is it.
- Sorting events is trivial when stored as epoch (smallest to largest = oldest to newest).
- Timezone-independent logs prevent confusion across data centres.
- APIs use epoch to avoid locale/timezone bugs in communication.
Fun Facts
Epoch 1,000,000,000 was reached on September 8, 2001 at 01:46:40 UTC. Epoch 1,234,567,890 occurred on February 13, 2009 at 23:31:30 UTC — programmers posted "Unix time party" messages.
Related Reading
- Timezone Converter — convert times across zones.
- Date Difference Calculator — count days between dates.