Unix timestamps appear everywhere in logs, APIs and databases, but they are meaningless until you know whether they are in seconds or milliseconds and how time zones apply. This guide clears that up.
What a Unix timestamp is
A Unix timestamp is the number of seconds (or sometimes milliseconds) elapsed since 1970-01-01 00:00:00 UTC, known as the epoch. Because it is a simple number with no time zone, it is unambiguous once you know the unit.
Seconds vs. milliseconds
This is the single most common source of confusion. Traditional Unix time is in seconds, but many JavaScript APIs such as Date.now() return milliseconds. A seconds value fed into a milliseconds converter produces a date thousands of years off — typically a clue you mixed up the two.
A quick test: a timestamp around 1,700,000,000 is seconds; one around 1,700,000,000,000 is milliseconds.
How time zones work
The timestamp itself has no time zone — it is always an offset from UTC. When you convert it, the same instant maps to a different local time depending on the viewer. A good converter shows both the UTC time and the local time in your browser.
The year 2038 problem
Systems that store Unix time as a signed 32-bit integer will overflow on 2038-01-19. Modern browsers use 64-bit-safe numbers and are unaffected, but many older embedded and C-based systems are not.