Intro

Open a database, an API response, or a server log and you will see time stored not as "2026-08-17 18:00" but as a number like 1786672800. That number is a Unix timestamp: the seconds elapsed since January 1, 1970, 00:00:00 UTC — a moment called the Unix epoch.

It looks cryptic, but timestamps are one of the great quiet inventions of computing: a tiny, unambiguous way to store an exact instant that works in every timezone on Earth. This guide explains how they work, why the world standardized on them, and the traps to watch out for.

Why 1970?

The Unix epoch was chosen in the early days of the Unix operating system (Bell Labs, late 1960s) simply because it was a convenient, round, already-past date. It had nothing to do with any cosmic event — it just needed to be a fixed point everyone could agree on, and 1970-01-01 UTC stuck.

The choice spread because Unix influenced everything: C, the language of operating systems, made the time_t type a seconds-since-epoch counter, and every language and system that inherited that lineage (which is to say, basically all of them) kept the convention.

Why timestamps beat dates

Storing time as a number solves two problems that formatted dates cannot: size and ambiguity.

  • Compact — ten digits versus a 25-character string like "2026-08-17T18:00:00+01:00". When you store billions of rows, that matters.
  • Unambiguous — a timestamp is an instant, not a wall-clock reading. The same number is the same moment in London, Tokyo, and New York; only its display changes.
  • Sortable — timestamps compare numerically, so ordering by time is trivial and fast in any database.
  • Timezone-free — no daylight-saving confusion, no "which zone was this stored in" questions. The timezone is purely a display decision.

Tip: A timestamp represents the same instant everywhere — when you convert it, you are only choosing how to display it in your local timezone.

Seconds vs milliseconds: the classic bug

Unix time is defined in seconds, but a huge slice of the modern stack stores milliseconds instead — JavaScript’s Date, most NoSQL databases, many mobile SDKs. A millisecond timestamp is 1,000 times larger: today’s values are ~1.78 trillion (13 digits) rather than ~1.78 billion (10 digits).

The result is a genre of bug: paste a 13-digit value into a seconds-based system and the date is off by roughly 49 years. If you ever see a timestamp convert to 1970 or 2038 when you expected today, you have mixed precisions. The timestamp converter auto-detects both formats precisely so this never bites you there.

The 2038 problem

A 32-bit signed integer tops out at 2,147,483,647 seconds — which is January 19, 2038. Any system still storing timestamps in 32-bit integers will overflow on that date, breaking clocks and date math, the same way two-digit years threatened 2000.

Modern systems use 64-bit integers (safe until the year 292 billion) or store timestamps as text, so the practical risk is confined to legacy embedded devices and old firmware. But it remains a real, dated deadline — and a great trivia answer.

Working with timestamps day to day

For everyday use, remember the two conversions: to read a timestamp, convert it to your local date and time; to create one, take any date and count seconds (or milliseconds) from the epoch.

The timestamp converter on this site does both instantly — it shows the current timestamp, converts any pasted value with automatic seconds/milliseconds detection, and converts dates back to timestamps for your code or database queries.

Practical takeaway

Treat a timestamp as a number with an explicit unit and an agreed time scale. Label seconds versus milliseconds, preserve an unambiguous instant, and convert to a named local zone only for display. A timestamp converter makes a fast sanity check; it cannot infer a missing unit or repair a value that was stored incorrectly.

FAQ

What is a Unix timestamp?

The number of seconds (or milliseconds) elapsed since January 1, 1970 00:00:00 UTC — the Unix epoch. It represents an exact instant, independent of timezone.

Why is 1970 the starting point?

It was simply the convenient round date chosen when Unix was designed in the late 1960s. It became the global standard because Unix and its conventions spread everywhere.

What is the difference between seconds and milliseconds timestamps?

Milliseconds are 1,000 times larger. Seconds timestamps are about 10 digits today; millisecond timestamps are 13 digits. Mixing them up is a common source of bugs.

What happens in 2038?

Systems storing timestamps in 32-bit integers overflow on January 19, 2038. Modern 64-bit systems are unaffected for billions of years.

How do I convert a timestamp to a readable date?

Paste it into the timestamp converter — it auto-detects seconds vs milliseconds and shows your local date and time instantly.

Sources