Open any API response or log file and you'll meet a number like 1784140200. That's a moment in time — counted in seconds since midnight UTC on January 1, 1970. Here's why computing settled on that, and how to work with it without timezone bugs.
Why count from 1970?
Early Unix developers needed a compact way to store time. Instead of juggling years, months, leap years and timezones, they picked an arbitrary zero point — the "epoch," January 1, 1970 UTC — and stored every moment as seconds elapsed since. One integer, sortable, subtractable, timezone-free. The convention stuck and now underpins nearly every operating system, database and API.
Seconds or milliseconds?
The classic gotcha: Unix time is traditionally seconds (10 digits today), but JavaScript uses milliseconds (13 digits). Feed a millisecond value into a seconds-based tool and you get a date 50,000 years in the future; the reverse gives you January 1970. Rule of thumb: 10 digits = seconds, 13 = milliseconds.
Timestamp → human date and back, with live current time.
Open Timestamp ConverterThe timezone trap
A timestamp itself has no timezone — it's a universal instant. Timezones only appear when you format it for humans. 1784140200 is 08:30 in London and 13:00 in Delhi simultaneously; both are correct renderings of the same instant. Bugs happen when code formats a timestamp using the server's timezone and shows it to a user in another — always store timestamps, convert to the user's zone at display time.
Where you'll meet them
- APIs and databases — creation dates, expiries, event times.
- JWT tokens — the
iat(issued at) andexp(expires) claims are Unix timestamps; decode one with the JWT Decoder. - Log files — sortable by construction, which is the point.
- Cron and schedulers — comparisons against "now" are integer math; see our cron guide.
The year 2038 footnote
Old 32-bit systems store the count in a signed 32-bit integer, which overflows on January 19, 2038. Modern 64-bit systems are safe for ~292 billion years — but it's why embedded and legacy systems are migrating now. If you see date bugs clustered around 2038, this is why.