Free tools

Unix timestamp converter

Turn a Unix timestamp into a date in any time zone, or a date into a timestamp. Seconds, milliseconds and microseconds are detected for you.

Current Unix time

1793987381
Milliseconds 1793987381817

Timestamp to date

Read as seconds.

UTC —
Your time zone —
—
ISO 8601 —
HTTP date (RFC 7231) —
Relative —
Unix seconds —
Unix milliseconds —

Date to timestamp

Unix seconds —
Milliseconds —
ISO 8601 (UTC) —

Runs in your browser. Nothing you type here is sent to a server.

Schedule a request for a timestamp

Delay can send an HTTP request to your app at a time you pick, up to 24 hours ahead, or on a cron schedule in your time zone. Every run is kept with its response, and failed jobs retry on the delays you set. Free for 1,000 requests a month.

What a Unix timestamp is

A Unix timestamp counts the seconds since 00:00:00 UTC on January 1, 1970, the Unix epoch. It carries no time zone: 1700000000 is the same instant everywhere, and only turning it into a date and a time needs a zone.

That makes timestamps a safe way to store and pass around a moment, in databases, logs, JWTs and webhook headers. A webhook signature header, for example, usually carries the time it was signed as a timestamp, so the receiver can reject old requests.

Seconds, milliseconds or microseconds

Unix tools, PHP, Python and most APIs use seconds. JavaScript's Date.now() and Java use milliseconds, and some databases and tracing tools use microseconds or nanoseconds. The length gives it away: a timestamp from this decade has 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. The converter reads the unit from the length unless you pick one.

The year 2038 problem

Systems that store the timestamp as a signed 32-bit number run out at 2147483647, which is 03:14:07 UTC on January 19, 2038. One second later the number wraps to a date in 1901. 64-bit timestamps, used by current languages and databases, last for billions of years.

Questions

How do I get the current Unix timestamp?

In a shell, date +%s. In JavaScript, Math.floor(Date.now() / 1000). In PHP, time(). In Python, int(time.time()). In SQL, UNIX_TIMESTAMP() in MySQL or extract(epoch from now()) in PostgreSQL. The live counter at the top of this page shows it too.

Is a Unix timestamp in UTC?

It is counted from midnight UTC on January 1, 1970, and it means the same instant in every time zone. Time zones only matter when you turn it into a date and time to show someone.

How do I tell seconds from milliseconds?

Count the digits. For dates between 2001 and 2286, seconds have 10 digits and milliseconds 13. If a date comes out in January 1970, a value in seconds was read as milliseconds. If it lands tens of thousands of years from now, it's the other way round.

Do Unix timestamps count leap seconds?

No. Unix time treats every day as exactly 86,400 seconds, so a leap second repeats or skips a timestamp instead of adding one. For scheduling and logging this almost never matters.

Can a Unix timestamp be negative?

Yes. Negative timestamps are dates before 1970: -86400 is December 31, 1969. Most languages handle them, but some older systems and APIs don't accept them.

Schedule your first cron job

Free for 1,000 requests a month. No credit card.

Read the docs