A little help goes a long way. Find a tool/

Time FIELD NOTES · 4 MIN READ

How Unix Time Works

Unix time counts seconds since 1970-01-01 UTC; one integer for any instant, why 10- and 13-digit timestamps differ, and the 2038 limit.

Every photo, log line, and database row hides a quiet number that just counts seconds since midnight on 1 January 1970. Unix time is the most-used clock in the world precisely because it throws almost everything away — no months, no time zones, no calendars — and keeps only the one thing computers need: a single integer that identifies an instant.

One number, one instant

Unix time (also called epoch time or POSIX time) is the number of seconds elapsed since 1970-01-01 00:00:00 UTC — "the epoch." That reference instant is zero; times before it are negative numbers, so 1969-12-31 23:59:59 is −1. Crucially, the count is anchored to UTC, not to any local clock: a timestamp means the same instant in Tokyo and Toronto, and the whole apparatus of offsets and daylight saving lives somewhere else entirely (the conversion rules covered in how time zones work). Reading a timestamp never changes it; only the way you display it depends on where someone is standing.

Reading a timestamp

A few anchors make the scale intuitive:

0             → 1970-01-01T00:00:00Z   the epoch itself
86,400        → 1970-01-02T00:00:00Z   one day = 86,400 seconds
1,000,000,000 → 2001-09-09T01:46:40Z   the "gigasecond", a Sunday
2,147,483,647 → 2038-01-19T03:14:07Z   the end of the 32-bit world

Division does the rest: 1,000,000,000 seconds is 1,000,000,000 / 86,400 ≈ 11,574 days, about 31.7 years after 1970 — hence September 2001. One practical wrinkle is seconds versus milliseconds. Unix time is defined in seconds, but JavaScript's Date.now() returns milliseconds, so you will meet both in the wild: 10-digit numbers (like 1,700,000,000, from late 2023) are seconds; 13-digit numbers (1,700,000,000,000) are milliseconds. The Epoch Converter accepts both with a unit selector, which prevents the classic off-by-a-thousand bug where a date lands in 1970.

Why computers love it

Because it is an integer, time becomes ordinary arithmetic. "Which happened first?" is a comparison; "how long between them?" is a subtraction; sorting events is sorting numbers. Compare that with the alternative of storing "March 3, 2:15 PM" and you see the appeal — month lengths vary, leap days intrude, and daylight saving makes local wall clocks jump. Storage follows the same logic: one 64-bit number per event, no strings to parse. The shape is everywhere once you look for it: cache expiry is "current time plus 300 seconds," rate limits reset at round numbers of seconds, backups and cron jobs compare timestamps, and a file's modification time is exactly this count. The rule of thumb every programmer eventually learns is store the instant, convert for display: keep timestamps in raw Unix time (or an equivalent UTC-based format), and render them into a local calendar and clock only when a human looks. The same principle powers the 24-hour style used in aviation and logs — military time exists to remove AM/PM ambiguity exactly as Unix time removes timezone ambiguity.

The quirks: leap seconds and the 2038 cliff

Two sharp edges are worth knowing. First, Unix time ignores leap seconds: the international timekeeping service occasionally inserts a second into UTC so it stays aligned with Earth's rotation, but Unix days are always exactly 86,400 seconds long — the leap second is instead smeared out invisibly. The simplification means timestamps never jump backward, at the cost of occasionally disagreeing with true atomic time by a second.

Second, the famous year 2038 problem. A 32-bit signed integer tops out at 2,147,483,647, which as Unix time is 2038-01-19 03:14:07 UTC — one second past that overflows and wraps negative. Systems still running 32-bit clocks (embedded devices, some file formats) will misbehave unless they moved to 64-bit, which is good for about 292 billion years. JavaScript adds its own gentler limit: Date values may range over ±8,640,000,000,000,000 milliseconds — about ±100 million days, dates beyond which tools report out of range rather than nonsense.

Try it yourself

Paste any timestamp (or 13-digit millisecond count) into the Epoch Converter to see the exact UTC date, time, and weekday — try 0, 86,400, and 2,147,483,647 to watch the anchors land. Convert the resulting UTC instant into any city's local time with the Time Zone Converter, or re-express it on the 24-hour clock with the Military Time Converter.

Frequently asked questions

What is a Unix timestamp?
The number of seconds elapsed since 1970-01-01 00:00:00 UTC, called the epoch. Zero is that instant; times before it are negative (1969-12-31 23:59:59 is −1). Because the count is anchored to UTC, the same timestamp identifies the same instant everywhere in the world — time zones only affect how it is displayed.
Why did Unix pick January 1, 1970?
It was a convenient round beginning-of-the-decade reference when the Unix developers set the epoch in the early 1970s — close to "now", easy to remember, and late enough that earlier dates were rare in computing. The specific midnight was chosen so the day count and second count start clean together.
Is a timestamp in seconds or milliseconds?
Unix time is defined in seconds (10 digits today, e.g. 1,700,000,000), but JavaScript’s Date.now() returns milliseconds (13 digits). A 13-digit number treated as seconds lands in 1970 — the classic off-by-a-thousand bug. Check the digit count or convert explicitly with a unit selector.
Does Unix time account for time zones or leap seconds?
Neither. It is a timezone-free count of seconds, which is the point — you store the instant and convert to a local view only when displaying it. Leap seconds are also ignored: every Unix day is exactly 86,400 seconds, with the occasional real leap second smeared into the count, so timestamps never jump backward.
What is the 2038 problem?
A 32-bit signed integer can count up to 2,147,483,647, which as Unix time is 2038-01-19 03:14:07 UTC. One second later the count overflows and wraps negative on systems still using 32-bit time. 64-bit systems are safe for roughly 292 billion years; the risk is limited to old embedded devices and formats.