All topics
Topic hub

Unix timestamp conversion

What epoch time is, and why the numbers are easy to misread

A Unix timestamp counts the number of seconds that have elapsed since the Unix epoch — January 1, 1970, 00:00:00 UTC. It's timezone-agnostic by design: the number itself doesn't encode a timezone at all, and converting it to a readable date in a specific timezone is a separate display step performed by whatever's reading the timestamp, not something baked into the number.

The most common mistake is unit confusion. A timestamp in seconds for a recent date is a 10-digit number; the same moment in milliseconds is 13 digits; some systems (particularly databases and high-precision logging) use microseconds (16 digits) or nanoseconds (19 digits). Feeding a millisecond timestamp into a tool expecting seconds lands you somewhere around the year 46,000 rather than today — which is usually the first sign something's off.

There's also a real deadline behind epoch time: the classic 32-bit signed Unix timestamp overflows at 03:14:07 UTC on January 19, 2038 — the "Year 2038 problem." Most modern systems have already moved to 64-bit timestamps, which push that ceiling out for billions of years, but any code still storing epoch time in a 32-bit signed integer will wrap around and produce an invalid or negative date at that moment. Unixly and Epochly both handle the seconds/milliseconds/microseconds/nanoseconds detection automatically and convert in both directions instantly, without a network round-trip.

The app

Frequently asked questions

What exactly is a Unix timestamp?

It's the number of seconds elapsed since January 1, 1970, 00:00:00 UTC — the Unix epoch. It's a single number with no built-in timezone; converting it to a specific date and time in a specific timezone happens when something displays or parses it, not in the number itself.

How can I tell if a timestamp is in seconds, milliseconds, or something else?

Digit count is the quick tell for a recent date: roughly 10 digits means seconds, 13 digits means milliseconds, 16 means microseconds, and 19 means nanoseconds. A tool that auto-detects the unit saves the trial-and-error of guessing.

What is the Year 2038 problem?

Classic Unix timestamps were stored as a signed 32-bit integer, which overflows at 03:14:07 UTC on January 19, 2038. Any system still using a 32-bit signed timestamp will wrap around to an invalid or negative date at that moment; most modern systems have already switched to 64-bit timestamps, which don't have this ceiling in any practical timeframe.

Does a Unix timestamp change depending on my timezone?

No — the underlying number is always relative to UTC and identical everywhere in the world for the same instant. What changes by timezone is only how it's displayed once converted to a human-readable date and time.