ply.wtf

Epoch Converter

Convert Unix timestamps to human dates and back, in any timezone. Seconds, milliseconds, microseconds and nanoseconds are detected automatically.

Current Unix time


Timestamp → date


Date → timestamp

What a Unix timestamp actually is

The number of seconds elapsed since 1 January 1970, 00:00:00 UTC — the "Unix epoch". It carries no timezone: the same timestamp is one instant everywhere on Earth, and only becomes a date when you decide which timezone to render it in. That property is exactly why it is the right thing to store in a database.

The year 2038 problem

A signed 32-bit integer runs out at 214748364719 January 2038, 03:14:07 UTC. One second later it wraps to negative and the date reads as December 1901.

Modern 64-bit systems are fine. What is not fine: 32-bit embedded devices, old database columns declared as INT, binary protocols with a 4-byte time field, and file formats frozen decades ago. If you write firmware or maintain schemas from the 2000s, that column is worth checking now rather than in 2037.

Seconds or milliseconds?

Unix tooling, Python's time.time() and Postgres all speak seconds. JavaScript'sDate.now() speaks milliseconds. Mixing the two is the single most common timestamp bug there is: interpret milliseconds as seconds and you land in the year 57000; the other way round and you land in January 1970. A quick sanity check — a current timestamp is 10 digits in seconds, 13 in milliseconds.

Other tools