Why Unix time is used everywhere
Storing a single integer instead of a formatted date string avoids ambiguity across timezones, locales, and date formats — sorting, comparing, and doing arithmetic on timestamps is trivial integer math, which is why nearly every database, log format, and API uses it internally even when displaying a human-readable date to the user.
Frequently asked questions
What is a Unix timestamp?
The number of seconds elapsed since midnight UTC on January 1, 1970 (the Unix epoch) — a compact, timezone-independent way to represent a point in time.
Why do some timestamps have 13 digits instead of 10?
10 digits counts seconds; 13 digits counts milliseconds, the unit JavaScript's Date.now() returns by default. Mixing the two is a common bug.
What happens when Unix time overflows in 2038?
Systems storing time as a signed 32-bit integer overflow on January 19, 2038, wrapping to a date in 1901. Most modern systems now use 64-bit integers, avoiding the issue.
ChistStudio