Skip to main content

Developer

Unix timestamps explained

What a Unix timestamp is, how to read one, and the seconds-versus-milliseconds trap.

Published 2026-10-11

Counting seconds since 1970

A Unix timestamp is the number of seconds that have passed since 1 January 1970 at 00:00:00 UTC, known as the Unix epoch. For example, 0 is that exact moment and 86,400 is one day later.

Because it is just a number, it is easy to store, compare and sort, and it does not depend on any time zone.

Seconds or milliseconds?

Classic Unix time uses seconds and currently has 10 digits. JavaScript's Date.now() and many APIs use milliseconds, which gives 13 digits.

If a converted date lands in January 1970 or far in the future, you probably mixed up the units. Divide a millisecond timestamp by 1,000 to get seconds.

Time zones and display

A timestamp identifies one moment everywhere in the world. Time zones only matter when you display it as a calendar date and clock time.

Our converter shows the result in UTC using the ISO 8601 format, which ends with a Z. Convert to local time in your application when you show it to a user.

Pitfalls to avoid

Systems that store timestamps in a signed 32-bit integer will overflow on 19 January 2038. Modern systems use 64-bit values and are not affected.

Do not add 86,400 seconds to represent one calendar day if daylight saving matters. Days around a clock change are 23 or 25 hours long in local time.