Skip to main content
TIMESTAMP

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

  1. Watch the values update once per second.
  2. Select Copy Seconds or Copy Milliseconds to copy the value on screen.
  3. Select Pause to freeze the clock while you compare or paste, and Resume to continue.
  4. 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 +%s

PostgreSQL

SELECT EXTRACT(EPOCH FROM now())::bigint;

MySQL

SELECT UNIX_TIMESTAMP();

Frequently Asked Questions

How often does the timestamp update?
Once per second, aligned with the start of each second on your device's clock.
Does this value come from a server?
No. It is calculated in your browser from your device's clock. Nothing is requested from a server, so it keeps working on a slow connection.
Why does my server show a different timestamp?
Clocks drift. Servers normally synchronise with NTP, while a phone or computer with automatic time turned off can be seconds or minutes out. Compare both and fix the clock that is out of sync.
How many digits does a Unix timestamp have?
Today a timestamp has 10 digits in seconds and 13 digits in milliseconds. Seconds reach 11 digits in November 2286.