← Back to the tool

What Is a Unix Timestamp? Epoch Time Explained Simply

Updated: May 2026

A Unix timestamp is one integer that tells you exactly when something happened — no calendar, no timezone required. It is the single most widespread time representation in computing, found in every database, log file and API you will ever touch.

Convert a timestamp →

Free · No upload · Instant

The definition

A Unix timestamp — also called epoch time, POSIX time or Unix time — is the number of seconds that have elapsed since the Unix epoch: January 1, 1970 at 00:00:00 Coordinated Universal Time (UTC). The current timestamp is always a positive integer, and it increments by exactly one every second, regardless of leap years, daylight saving changes or the timezone of the observer.

For example, the timestamp 1735689600 corresponds to January 1, 2025, 00:00:00 UTC. The number has ten digits today; it will gain an eleventh digit sometime around 2286, long after any current hardware is still running.

The timestamp 0 is midnight on January 1, 1970 UTC — the Unix epoch itself. Negative timestamps represent dates before 1970, such as -86400 for December 31, 1969.

Why January 1, 1970?

The Unix epoch was chosen by the early Unix developers at Bell Labs in the late 1960s. The exact date is somewhat arbitrary; what mattered was picking a fixed reference point that would be far enough in the past that most practical timestamps would be positive, while still being recent enough to fit in the small integers of 1960s hardware.

Several competing epochs existed before Unix became dominant. IBM mainframes used January 1, 1900; GPS uses January 6, 1980; Windows FILETIME counts 100-nanosecond intervals from January 1, 1601. Unix's epoch won because Unix won: it became the foundation of Linux, macOS, Android, iOS, and the overwhelming majority of server infrastructure.

What a timestamp actually looks like

  • Seconds (10 digits)1735689600 — the most common form, used by system clocks, SQL databases, log files, server-side languages.
  • Milliseconds (13 digits)1735689600000 — used by JavaScript's Date.now(), Java, and most frontend APIs that need sub-second precision.
  • Microseconds (16 digits)1735689600000000 — used by PostgreSQL's EXTRACT(EPOCH …) at full precision, and high-frequency trading systems.
  • Nanoseconds (19 digits) — used by Go's time.UnixNano() and some kernel APIs.

When you receive an unknown timestamp, count its digits to identify the unit. A 10-digit number is seconds, 13-digit is milliseconds, and so on. Misidentifying the unit shifts the date by roughly 11.5 days (off by 1000 in the seconds interpretation) or 31 years (off by 1000 in the milliseconds interpretation).

Why developers prefer timestamps over formatted dates

  • Timezone-neutral — a timestamp is the same in Tokyo and in New York. Display formatting is a separate concern, done at render time.
  • Sortable — comparing two timestamps is a simple integer comparison. No parsing, no locale issues.
  • Compact — 10 characters vs 25+ for an ISO 8601 string.
  • Unambiguous — there is no risk of DD/MM/YYYY vs MM/DD/YYYY confusion.
  • Arithmetic-friendly — "add 7 days" is just ts + 604800.
  • Universal — every programming language, database engine and operating system understands Unix time natively.

Common misconceptions

Timestamps do not include timezone information. A Unix timestamp is purely a count of seconds from a fixed UTC reference. The timezone only matters when you convert a timestamp to a human-readable string. The timestamp 1735689600 represents the same instant everywhere on Earth.

Timestamps are not affected by leap seconds. The POSIX specification deliberately ignores leap seconds. UTC occasionally inserts a leap second to stay aligned with Earth's rotation, but Unix timestamps pretend that every day has exactly 86 400 seconds. This means a Unix clock is technically not perfectly aligned with UTC at the sub-second level, but for virtually all applications this difference is irrelevant.

Daylight Saving Time (DST) has no effect on Unix timestamps. DST is a display convention applied when converting a timestamp to local time. The underlying integer increments at a constant rate.

Where you encounter Unix timestamps every day

  • HTTP headers: Last-Modified, Expires, If-Modified-Since use RFC 2822 dates derived from Unix time.
  • JWT tokens: the iat (issued at), exp (expires) and nbf (not before) claims are Unix timestamps in seconds.
  • Log files: Apache, Nginx, systemd journal and most cloud logging services store events as Unix timestamps.
  • Databases: PostgreSQL's timestamp, MySQL's UNIX_TIMESTAMP(), SQLite's integer columns all use epoch-based storage.
  • File systems: file creation, modification and access times on Linux, macOS and Windows are stored as Unix timestamps internally.
  • APIs: GitHub, Stripe, Twitter/X, Slack and virtually every REST or GraphQL API returns timestamps as integers.