epochdesk

EPOCHDESK / GUIDES

Unix timestamps explained: epoch, units and negative values

A Unix timestamp describes an instant as elapsed time from January 1, 1970 at 00:00:00 UTC. It does not store a location or time zone. This makes it useful for comparing events from logs, databases and APIs.

Start with a known reference

Unix secondsUTC date
01970-01-01 00:00:00
11970-01-01 00:00:01
-11969-12-31 23:59:59
17040672002024-01-01 00:00:00

How to convert a Unix timestamp

  1. Copy the numeric timestamp from your source.
  2. Check whether the source specifies seconds, milliseconds or microseconds.
  3. Paste it into the timestamp converter and select that unit.
  4. Choose a display time zone. Use the ISO UTC output when comparing systems.

Why a timestamp can produce a date in 1970

A modern seconds value interpreted as milliseconds is one thousand times too small. For example, 1704067200 seconds is January 1, 2024; the same number of milliseconds is January 20, 1970 at 17:21:07.200 UTC. Check the source unit before changing the date itself.

Historical and fractional values

Negative numbers represent instants before the epoch. A value of -0.5 seconds means 1969-12-31T23:59:59.500000Z. Epochdesk rounds integer seconds down, so this instant has an integer-seconds output of -1, not 0. Select the unit explicitly for historical values: digit counts cannot reliably identify their unit.

Limits to keep in mind

Unix time does not count leap seconds. Epochdesk rejects ISO dates with a seconds field of 60. It preserves up to microsecond precision; the selected-zone clock display shows whole seconds. A timestamp is not a duration format: use numeric values or an ISO date with seconds and an explicit UTC offset.

For the representation used by browser date APIs, see the MDN Date reference.

Practical timestamp guides