What is Unix time?
Unix time counts the seconds elapsed since 1970-01-01 00:00:00 UTC (the epoch), ignoring leap seconds. It is timezone-independent, which is why logs, databases and APIs store it.
Seconds, milliseconds or microseconds?
- 10 digits — seconds (
date +%s, PHP, Pythontime.time()truncated, JWT claims) - 13 digits — milliseconds (JavaScript
Date.now(), Java) - 16 digits — microseconds (some databases and tracing systems)
The year 2038 problem
Systems that store Unix time in a signed 32-bit integer overflow at 2147483647 — 2038-01-19 03:14:07 UTC. Embedded devices and old firmware are the usual suspects.
Command line
Linux: date -d @1760277000 · macOS: date -r 1760277000 · PowerShell: [DateTimeOffset]::FromUnixTimeSeconds(1760277000)