What is a Unix Timestamp?
A Unix timestamp (epoch time) is the number of seconds since January 1, 1970 00:00:00 UTC. It's used universally in programming for storing and transmitting dates.
Common Timestamp Values
| Timestamp | Date |
|---|---|
0 | Jan 1, 1970 (Unix Epoch) |
1000000000 | Sep 9, 2001 |
1700000000 | Nov 14, 2023 |
2000000000 | May 18, 2033 |
Getting Timestamps in Code
// JavaScript
Math.floor(Date.now() / 1000)
// Python
import time; int(time.time())
// Bash
date +%s
// PHP
time()