📄Unix Timestamp
Also known as Unix Time, Epoch Time, POSIX Time
A time written as the seconds since 1 January 1970 UTC. One number, the same everywhere.
Think of it like
Think of it like a stopwatch that was started long ago. It has never stopped.
Example
Jack's app logs 1700000000 for a sign-up. A tool reads it back as 14 November 2023, 22:13 UTC.
Why it matters
Two timestamps can be subtracted to get the seconds between them. No time zones or calendars get in the way.
Definition
Example code
console
$ date -u -d @1700000000 '+%Y-%m-%d %H:%M:%S'
2023-11-14 22:13:20Common mistake
Key takeaways
- 1Counts seconds. From the start of 1970 in UTC.
- 2No time zones. One number everywhere on Earth.
- 3Watch the unit. Milliseconds are a thousand times bigger.