Computers often store time as a Unix timestamp: the number of seconds since midnight UTC on January 1, 1970. Paste one to see the date it means, or pick a date to get its timestamp.
| JavaScript | Math.floor(Date.now() / 1000) |
| PHP | time() |
| Python | int(time.time()) |
| Java | Instant.now().getEpochSecond() |
| C# | DateTimeOffset.UtcNow.ToUnixTimeSeconds() |
| Go | time.Now().Unix() |
| Ruby | Time.now.to_i |
| MySQL | SELECT UNIX_TIMESTAMP(); |
| PostgreSQL | SELECT EXTRACT(EPOCH FROM NOW())::bigint; |
| Linux / macOS | date +%s |
| Excel / Sheets | =(A1/86400)+DATE(1970,1,1) turns a timestamp in A1 into a date |
Seconds or milliseconds? Unix systems, PHP, and most databases count seconds (10 digits today). JavaScript and Java count milliseconds (13 digits). We guess from the number of digits; pick the unit yourself if the date looks wrong.
Timestamps have no time zone. The same number means the same instant everywhere. Only the way it's displayed changes, which is why we show it in both UTC and your own time zone.
The year 2038 problem: older systems store timestamps as 32-bit numbers, which run out at 03:14:07 UTC on January 19, 2038. Modern systems use 64-bit numbers and are fine for billions of years. Everything here runs in your browser.