If you have ever seen a ten-digit number like 1700000000 where a date should be, you have met a Unix timestamp. It is how computers count time: one plain number, no months, no time zones, no ambiguity. Once you know how to read it, you can decode almost any date a system hands you.

What a Unix timestamp actually is

A Unix timestamp is the number of seconds that have passed since midnight on January 1, 1970, in Coordinated Universal Time (UTC). That starting moment is called the Unix epoch. So a timestamp of 0 means exactly 1970-01-01 00:00:00 UTC, a timestamp of 60 means one minute later, and a timestamp of 86,400 means one full day later.

The appeal is obvious once you think about it. Dates in everyday formats are messy: "03/04/2026" means March 4 in the United States and April 3 in most of the rest of the world, and "2:30 PM" means nothing without a time zone. A single integer sidesteps all of that. Two timestamps can be compared with a simple greater-than check, subtracted to get an exact duration, and stored in a database as one small number. That is why nearly every programming language, database, log file, and API uses them under the hood, even when the screen shows you a friendly calendar date.

Why January 1, 1970?

The date was not chosen for any cosmic reason. Unix was being developed at Bell Labs in the late 1960s and early 1970s, and its creators needed a convenient starting point for the system clock. January 1, 1970 was close to the present day at the time, easy to remember, and the start of a fresh decade. The convention stuck, spread to Linux, macOS, and most of the internet's infrastructure, and is now effectively permanent.

How to read a timestamp at a glance

You can estimate a timestamp's scale just by counting its digits:

If you paste a 13-digit number into a converter that expects seconds, you will land somewhere around the year 5138 — a classic sign you forgot to divide by 1,000.

Worked example: decoding 1700000000

Let us decode 1,700,000,000 step by step. First, the digit count: 10 digits, so it is in seconds. Converting it to a date gives November 14, 2023, at 22:13:20 UTC. That is 8:13 PM in London in November, 5:13 PM in New York, and 2:13 PM in Los Angeles — the same instant, expressed in different local clocks.

Here is a timestamp from today for comparison: 1,794,364,800 is November 13, 2026, at 00:00:00 UTC — midnight at the start of the day this article was published. And going the other direction, if you need the timestamp for a specific date, count the seconds from the epoch to that date; a converter does it instantly, but the idea is just elapsed-seconds arithmetic.

To convert by hand in a pinch, remember that one day is 86,400 seconds and one year is roughly 31,557,600 seconds. From the epoch to November 2023 is about 53.9 years, and 53.9 times 31,557,600 lands very close to 1.7 billion.

Time zones: timestamps are always UTC

This is the single most important thing to understand about Unix timestamps: they have no time zone. A timestamp records one absolute instant, and every time zone is just a different way of displaying that instant. 1,700,000,000 is 22:13 in London and 17:13 in New York because those cities were at different offsets from UTC at that moment — not because the timestamp changed.

This is why developers store timestamps and convert them to local time only at the moment of display. Store the local time instead and you inherit every daylight saving transition and time-zone database update. Store the timestamp and the display logic can change freely without touching the data.

Seconds vs. milliseconds: the most common bug

The number one timestamp mistake in software is mixing up seconds and milliseconds. JavaScript's Date object works in milliseconds, so new Date(1700000000) gives you January 20, 1970 — twenty days after the epoch — because it read 1.7 billion milliseconds instead of seconds. The fix is one multiplication: new Date(1700000000 * 1000).

Python's datetime.fromtimestamp() expects seconds, Go's time.Unix() takes seconds plus nanoseconds, and most databases have separate functions for each unit. Whenever a date comes out wildly wrong — usually in 1970 or the year 5000 — check the units first. It is the bug in nine cases out of ten.

The Year 2038 problem

Early Unix systems stored timestamps as a signed 32-bit integer, which maxes out at 2,147,483,647. That number corresponds to January 19, 2038, at 03:14:07 UTC. One second later, a 32-bit counter would overflow to a large negative number and the clock would jump back to December 1901.

This is the same class of problem as Y2K, but the fix is already mostly in place: modern systems use 64-bit timestamps, which do not overflow until the year 292 billion — comfortably beyond the lifetime of the sun, let alone the software. The remaining risk lives in old embedded systems, aging file formats, and 32-bit hardware still in service. If you maintain anything that stores time as a 32-bit integer, 2038 is your deadline to migrate, and the migration is straightforward: widen the field.

AdvertisementAd slot: in-content

Frequently asked questions

What time zone is a Unix timestamp in?

None — a Unix timestamp is always in UTC by definition. It records one absolute instant, and any time zone is applied only when the timestamp is displayed as a date and time. That is why the same timestamp shows as different clock times in London and New York.

Why does Unix time start on January 1, 1970?

The date was a convenient, easy-to-remember starting point chosen when Unix was developed at Bell Labs around 1969–1970. It is close to the era when the system was built and marks the start of a decade. The convention spread with Unix and Linux and became the internet's default.

How do I tell if a timestamp is in seconds or milliseconds?

Count the digits. Ten digits means seconds, thirteen means milliseconds, sixteen means microseconds, and nineteen means nanoseconds. If a date converts to 1970 or to the year 5000, you almost certainly have the wrong unit — divide or multiply by 1,000.

What happens when Unix time runs out in 2038?

On 32-bit systems, the counter overflows on January 19, 2038, at 03:14:07 UTC and wraps to a negative number. Modern 64-bit systems are unaffected, since their timestamps last for hundreds of billions of years. The fix for older systems is to widen the stored value to 64 bits.