What Is Unix Time?
Unix time is one of the most common machine-readable ways to represent a moment. It turns time into a single number, which makes storage and comparison easy but also creates a few familiar traps.
The core idea
Unix time counts elapsed seconds from January 1, 1970 at 00:00:00 UTC. Instead of storing year, month, day, hour, minute, and second separately, a system can store one integer and interpret it later.
That design is efficient because computers are good at comparing numbers. If one timestamp is larger than another, it happened later. Databases, APIs, logs, and operating systems all benefit from that simplicity.
Why developers still rely on it
Unix time travels well between systems because it is timezone-neutral at the storage layer. A backend can save a timestamp in UTC seconds, and the frontend can render it in Tokyo, New York, or Madrid without changing the recorded moment.
It also works naturally with interval calculations. Subtracting one Unix timestamp from another gives you elapsed seconds directly, which is far easier than subtracting two formatted date strings.
The common mistakes
The most common bug is mixing seconds and milliseconds. Many APIs, databases, and shells use seconds, while JavaScript often uses milliseconds. A value with the wrong unit will usually land in 1970 or far in the future.
Another mistake is forgetting that Unix time is usually paired with UTC semantics. The number is not local to New York, London, or your laptop. The local interpretation happens later, when the timestamp is formatted for display.
Send the value 86400 through your system as Unix seconds. The expected UTC result is January 2, 1970 at midnight. If the receiving system displays a time just after midnight on January 1, it has likely interpreted your seconds as milliseconds.
Try the timestamp converter ↗Reference material
Further reading on the standards and runtime behavior discussed here.
RFC 3339: date-time notation ↗JavaScript Date: timestamp model ↗Examples added September 30, 2026 · Suggest a correction
Put it into practice
Use these tools to apply what this guide covers.
Continue learning
Explore another explanation, then try its examples in a related tool.