Current Unix Timestamp
The current Unix timestamp, updated every second. Copy the seconds or milliseconds value, or pause the clock to compare.
Seconds
—
Milliseconds
—
Updates every second.
The current Unix timestamp
The clock above shows the number of seconds and milliseconds that have passed since 1 January 1970 at 00:00:00 UTC. It reads your device's clock and refreshes every second, so if your device time is off, this value is off by the same amount.
When it is useful
Use the current timestamp to set expiry times, create test data, compare log entries or check whether a server's clock is in sync with yours. Because the milliseconds value is the same number JavaScript's Date.now() returns, it is also a quick way to sanity-check code.
Want the background? Read our comprehensive guide: What Is Unix Time?.
How to use this tool
- Watch the values update once per second.
- Select Copy Seconds or Copy Milliseconds to copy the value on screen.
- Select Pause to freeze the clock while you compare or paste, and Resume to continue.
- Select Refresh to read your device clock immediately.
Examples
How to read the current Unix timestamp in common languages and tools.
JavaScript (seconds)
Math.floor(Date.now() / 1000)JavaScript (milliseconds)
Date.now()Python
import time
int(time.time())PHP
time()Java (milliseconds)
System.currentTimeMillis()C#
DateTimeOffset.UtcNow.ToUnixTimeSeconds()Go
time.Now().Unix()Bash
date +%sPostgreSQL
SELECT EXTRACT(EPOCH FROM now())::bigint;MySQL
SELECT UNIX_TIMESTAMP();Frequently Asked Questions
How often does the timestamp update?
Does this value come from a server?
Why does my server show a different timestamp?
How many digits does a Unix timestamp have?
Related tools
- Unix Timestamp ConverterTurn a Unix timestamp into UTC, local time and ISO 8601.
- Epoch ConverterSee epoch seconds and milliseconds side by side, with UTC and local time.
- Milliseconds to DateConvert Unix milliseconds, such as Date.now() values, to a date.
- Timestamp DifferenceFind the time between two timestamps as a duration.