Unix timestamp converter
The current Unix time, live, and a converter between epoch timestamps and readable dates.
Current Unix time (seconds)
Milliseconds:
What is a Unix timestamp?
It's the number of seconds since 00:00:00 UTC on January 1, 1970, not counting leap seconds. Because it's the same number everywhere in the world at a given instant, programmers use it to store times without worrying about time zones.
Seconds or milliseconds?
A 10-digit number is seconds. A 13-digit number is milliseconds, which is what JavaScript's Date.now() returns. The converter detects which one you pasted.
Get the current timestamp in code
| Language | Code |
|---|---|
| JavaScript | Math.floor(Date.now() / 1000) |
| Python | int(time.time()) |
| PHP | time() |
| Bash | date +%s |
| SQL (MySQL) | UNIX_TIMESTAMP() |