Unix timestamps are the backbone of time representation in computing. If you work with APIs, databases, or server logs, understanding Unix time is essential.
What Is a Unix Timestamp?
A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970 00:00:00 UTC — known as the Unix epoch.
Example: The timestamp 1700000000 represents November 14, 2023 at 22:13:20 UTC.
Why Use Unix Timestamps?
Common Conversions
| Timestamp | Human-Readable Date |
|---|---|
| 0 | Jan 1, 1970 00:00:00 UTC |
| 1000000000 | Sep 9, 2001 01:46:40 UTC |
| 1700000000 | Nov 14, 2023 22:13:20 UTC |
| 2000000000 | May 18, 2033 03:33:20 UTC |
Converting in Code
// JavaScript: Current Unix timestamp
Math.floor(Date.now() / 1000);// JavaScript: Timestamp to Date
new Date(1700000000 * 1000);
# Python: Current Unix timestamp
import time
int(time.time())# Python: Timestamp to datetime
from datetime import datetime
datetime.utcfromtimestamp(1700000000)
The Year 2038 Problem
Unix timestamps stored as 32-bit signed integers will overflow on January 19, 2038. Most modern systems now use 64-bit integers, which extends the range to billions of years.
Milliseconds vs Seconds
Some systems (like JavaScript's Date.now()) use millisecond timestamps. Always check whether your timestamp is in seconds (10 digits) or milliseconds (13 digits).
Try It Yourself
Convert between Unix timestamps and human-readable dates with our free Unix Timestamp Converter.