DateRuler

Dates & time

Unix timestamp converter

Quick answer: The number of seconds since 00:00:00 UTC on January 1, 1970, ignoring leap seconds. 13-digit values are milliseconds and are converted automatically. A 10-digit value is seconds, the format used by most Unix tools, databases and APIs. A 13-digit value is milliseconds, the format returned by JavaScript's Date.now() and Java's System.currentTimeMillis().

  • Exact calendar math · cited sources (EIA, U.S. law)
  • Updated
  • Reviewed by Alex · How we calculate

Seconds or milliseconds both work.

Current Unix time:

What is a Unix timestamp?

The number of seconds since 00:00:00 UTC on January 1, 1970, ignoring leap seconds. 13-digit values are milliseconds and are converted automatically.

Seconds or milliseconds?

A 10-digit value is seconds, the format used by most Unix tools, databases and APIs. A 13-digit value is milliseconds, the format returned by JavaScript's Date.now() and Java's System.currentTimeMillis(). For example, 1700000000 is November 14, 2023 at 22:13:20 UTC, and 1700000000000 is the same moment in milliseconds.

Time zones and the year 2038

A timestamp is always UTC; only the display changes with your time zone. Systems that store time as a signed 32-bit integer run out at 2,147,483,647, which is 03:14:07 UTC on January 19, 2038. Modern 64-bit systems are not affected. Dates before 1970 are negative timestamps.

Related tools

Frequently asked questions

What is timestamp 0?

January 1, 1970, 00:00:00 UTC.

Does Unix time count leap seconds?

No. Every day is treated as exactly 86,400 seconds, so Unix time skips leap seconds.

How do I get the current timestamp in code?

In JavaScript use Math.floor(Date.now()/1000); in Python use int(time.time()); on Linux or macOS run date +%s.