Current Unix Timestamp
Get the current Unix timestamp in seconds and milliseconds. Live updating epoch time.
Open Timestamp Converter →What is the Current Unix Timestamp?
The Unix timestamp is the number of seconds elapsed since the Unix epoch: January 1, 1970 at 00:00:00 UTC. It increases by 1 every second and is the same everywhere in the world (it's timezone-independent). As of any moment, you can get it in JavaScript with
Math.floor(Date.now() / 1000), in Python with int(time.time()), or in a terminal with date +%s.Timestamps in Different Languages
- JavaScript:
Date.now()returns milliseconds. Divide by 1000 for seconds. - Python:
time.time()returns seconds as a float.int(time.time())for integer seconds. - PHP:
time()returns seconds.microtime(true)for milliseconds. - Java:
System.currentTimeMillis()returns milliseconds.Instant.now().getEpochSecond()for seconds. - SQL: MySQL:
UNIX_TIMESTAMP(). PostgreSQL:EXTRACT(EPOCH FROM NOW()).
// JavaScript Math.floor(Date.now() / 1000) // seconds Date.now() // milliseconds # Python import time int(time.time()) # seconds # Bash date +%s # seconds date +%s%N | cut -b1-13 # milliseconds -- SQL (PostgreSQL) SELECT EXTRACT(EPOCH FROM NOW())::integer;