Ad

What is Unix Time?

Unix time (also known as epoch time, POSIX time, or Unix timestamp) is a way to represent a specific moment in time as a single number — the count of seconds elapsed since 00:00:00 UTC on Thursday, 1 January 1970. That starting point is called the Unix epoch.

Why January 1, 1970?

When the Unix operating system was developed at Bell Labs in the late 1960s and early 1970s, its designers needed a simple, consistent reference point for measuring time. January 1, 1970 was chosen because it was recent, round, and convenient for the systems being built at the time. It has since become the universal standard for time representation in computing.

How Unix Time Works

Every second that passes, the Unix timestamp increments by 1. For example:

Negative timestamps represent moments before the epoch (before 1970). Most modern systems store timestamps as 64-bit integers, which can represent dates hundreds of billions of years into the future.

Seconds vs. Milliseconds

The Unix standard counts seconds. However, many programming environments (JavaScript's Date.now(), Java, etc.) return timestamps in milliseconds — 1000× larger. A 10-digit number is seconds; a 13-digit number is almost always milliseconds.

Unix Time Does Not Count Leap Seconds

Leap seconds are periodically added to UTC to keep it aligned with Earth's rotation. Unix time intentionally ignores them — every day is treated as exactly 86,400 seconds. This makes arithmetic simple but means Unix time can diverge from civil time by a few seconds.

The Year 2038 Problem

Older 32-bit systems store Unix timestamps as a signed 32-bit integer, which can only hold values up to 2,147,483,647 — corresponding to 2038-01-19 03:14:07 UTC. After that second, these systems will overflow and roll back to a negative number (1901). Modern 64-bit systems are not affected and can safely represent dates until the year 292 billion.

Common Uses in Programming

Getting the Current Epoch Time

Here's how to get the current Unix timestamp in common languages:

← Back to the live epoch converter

Ad