Unix timestamps explained
Published by InstantToolDeck · Updated November 2026
Computers need one simple way to store a moment in time. The most common is the Unix timestamp: a single number that counts the seconds since 1 January 1970 at 00:00:00 UTC. This moment is called the Unix epoch.
An example
The timestamp 1700000000 means 1,700,000,000 seconds after the epoch, which is 14 November 2023 at 22:13:20 UTC. Convert any value with the timestamp converter.
Why use timestamps?
- One number, no ambiguity. There is no time zone, date format or daylight saving rule to interpret.
- Easy to compare and sort. A larger number is always a later moment.
- Easy arithmetic. Adding 86,400 gives the same time one day later (ignoring calendar quirks).
Seconds or milliseconds?
Many systems count seconds, giving a 10-digit number for current dates. JavaScript, Java and many APIs count milliseconds, giving 13 digits. If a converted date lands in the year 50000 or in 1970, you probably used the wrong unit. Divide by 1,000 to go from milliseconds to seconds.
Time zones and daylight saving
A timestamp identifies a single instant everywhere on Earth. The time zone matters only when you display it as a calendar date. The same timestamp is 22:13 in London in winter, 17:13 in New York and 07:13 the next morning in Tokyo. Store and exchange timestamps in UTC, and convert to local time only for display. That avoids almost all daylight-saving bugs.
Leap seconds
Unix time ignores leap seconds, treating every day as exactly 86,400 seconds. This keeps arithmetic simple, which is why it is used in nearly all software.
The year 2038 problem
Older systems store the timestamp as a 32-bit signed integer, which overflows on 19 January 2038 at 03:14:07 UTC. Modern systems use 64-bit values, which last for billions of years. If you maintain legacy software or embedded devices, check how they store time.
Timestamps and unique IDs
Some identifiers embed a timestamp so they sort by creation time. Random identifiers such as UUID version 4 do not. Pick the type that suits how you will query the data.
Common mistakes
- Mixing seconds and milliseconds.
- Storing local time without a time zone.
- Assuming every day has 24 hours of local time. Daylight saving changes make some days 23 or 25 hours long.
- Parsing dates in ambiguous formats like 03/04/2026, which means different days in the US and Europe.
Frequently asked questions
What is the Unix epoch?
1 January 1970 at 00:00:00 UTC, the reference point from which Unix time is counted.
How do I get the current timestamp?
In JavaScript, Date.now() returns milliseconds; divide by 1000 for seconds. The converter on this site shows the current value.
Are timestamps affected by time zones?
No. A timestamp is an absolute moment. Time zones only affect how it is displayed.