What a Unix timestamp counts
A Unix timestamp is the number of seconds that have passed since 1970-01-01 00:00:00 UTC, a moment called the epoch. It is one number for the whole planet, so two servers on different continents agree on it without caring about time zones.
That makes it easy to store, sort and subtract, which is why logs, databases, tokens and APIs use it. To get a duration, subtract two timestamps. To show a date to a person, turn the number into text for their time zone, which is what this page does.
Unix time pretends every day has exactly 86,400 seconds. Leap seconds are not counted, so for almost all software they make no difference.
Languages and tools count in different units:
- Seconds: C, PHP
time(), GoUnix(), Pythontime.time()as a decimal, and the shell commanddate +%s. - Milliseconds: JavaScript
Date.now(), JavaSystem.currentTimeMillis()and many JSON APIs. - Microseconds: Parquet and Arrow timestamp columns, and the Chrome trace format.
- Nanoseconds: Go
UnixNano(), OpenTelemetry timestamps and the Linuxclock_gettimecall.
Seconds or milliseconds? How the guess works
A timestamp for a date in recent decades has a predictable length: 10 digits for seconds, 13 for milliseconds, 16 for microseconds and 19 for nanoseconds. Auto mode reads anything below 100 billion as seconds, below 100 trillion as milliseconds, below 100 quadrillion as microseconds, and anything larger as nanoseconds.
The guess can be wrong for dates close to 1970. The number 86400000 is one day in milliseconds, but it has only 8 digits, so Auto reads it as seconds and shows a date in September 1972. When you know the unit, pick it yourself. The page always says which unit it used and why.
Negative timestamps are dates before 1970. For example, -86400 is 1969-12-31 00:00:00 UTC.
The year 2038 problem
A signed 32-bit integer stops at 2,147,483,647. As a timestamp that is 2038-01-19 03:14:07 UTC. One second later the value wraps around to -2,147,483,648, which a program reads as 1901-12-13 20:45:52 UTC.
Software that keeps time in 64 bits is not affected. That covers current JavaScript, Python, Java and Go, and the 64-bit builds of Linux, macOS and Windows. Software that still stores seconds in a signed 32-bit field is affected: some embedded devices, older file formats, and database columns such as the MySQL TIMESTAMP type, which ends at that same second. Systems that read the field as unsigned last until 2106-02-07 06:28:15 UTC.
Paste any timestamp and this page tells you whether it fits. The 2038 limit example shows the last good second.
Time zones and daylight saving
A timestamp has no time zone. 1700000000 is the same instant in Tokyo and in Toronto. Only the way it is written changes: 22:13:20 in UTC, 23:13:20 in Berlin and 17:13:20 in New York, all on 14 November 2023.
Going the other way needs a zone, because "2023-11-14 22:13:20" means a different instant in each place. The right panel reads dates that carry an offset on their own, such as Z or +01:00, and uses the zone you picked for dates that do not.
Daylight saving creates two awkward cases. When clocks jump forward, the skipped hour does not exist, so a time inside it is moved to the nearest real moment. When clocks go back, the repeated hour happens twice, and the page uses the first one. In both cases it tells you.