Unix timestamps and ISO dates: how can they mean the same moment?

A long number and a date ending in Z can point to the very same moment.

Here's how to read both without shifting the time by mistake.

How do Unix timestamps and ISO dates describe one moment?

A Unix timestamp counts time from a fixed start; an ISO date-time writes a calendar date and clock reading.

Think of a Unix timestamp as a stopwatch with a fixed starting mark: the epoch, 1970-01-01T00:00:00Z. An ISO date-time is like a calendar beside a clock. They're two ways to label a point on the same timeline, so changing the label doesn't move the moment.

Here's midnight UTC on 2024-09-19 in three forms. The numbers count from the epoch; the date-time spells out when it is.

One timeline point connects Unix seconds 1726704000, Unix milliseconds 1726704000000 and UTC ISO 2024-09-19T00:00:00.000Z.
Three labels point to the same moment; the Z in the date-time means UTC. How we reviewed

Need to convert a Unix timestamp to a calendar date?

Why are Unix milliseconds longer numbers than Unix seconds?

Milliseconds count smaller pieces of time, so the number grows while the moment stays put.

Each second contains 1,000 milliseconds. A JavaScript Date uses the millisecond count.

1726704000 Unix seconds multiplied by 1000 equals 1726704000000 Unix milliseconds; divide by the same factor to return to seconds.
Digits alone don't establish the unit: use the sender's unit label or documentation.

How does a UTC offset identify the same moment?

A UTC offset tells you how far the written clock reading is ahead of or behind UTC, the shared reference clock.

A clock marked -04:00 is four hours behind UTC. Add those hours to its reading to express the same moment in UTC.

2024-09-19T12:30:00-04:00 and 2024-09-19T16:30:00.000Z show two clock readings connected to one instant.
The clock reading changes from 12:30 to 16:30; the moment doesn't change.

When does a local schedule need a named time zone?

A named zone supplies a place's clock rules across dates, including daylight-saving changes.

An offset describes one date and time; it doesn't carry the rules for a future local schedule. In New York, 2026-11-01 01:30 occurs twice with different offsets when daylight saving time ends.

America/New_York: 2026-11-01 01:30 occurs twice: 2026-11-01, 01:30 GMT-04:00 at 2026-11-01T05:30:00.000Z; 2026-11-01, 01:30 GMT-05:00 at 2026-11-01T06:30:00.000Z, one hour apart.
The zone explains the repeated hour; the offset distinguishes which occurrence you mean.

What happens when date text has no UTC offset?

The software reading it has to supply a zone, and different readers can use different rules.

JavaScript's built-in parsing treats a date alone as UTC, but a date plus a clock reading as local time when there's no offset. FluffyBench's Timestamp Converter resolves both forms in its selected Zone.

JavaScript built-in parsing: 2011-10-10 goes to UTC; 2011-10-10T14:48:00 goes to the computer's local zone. FluffyBench Timestamp Converter: both offset-free forms go to the selected Zone.
The same text can get a different meaning from a different parsing rule.

What information should travel with a timestamp?

Send the context that lets the next person or system read your value correctly. Match it to the kind of time you're sending.

Identify the representation, then attach its context: label a number as seconds or milliseconds; include Z or a numeric offset in date-time text; include the named zone for a future local schedule.
Choose the branch that matches your value before you pass it along.

Doing it in FluffyBench

FluffyBench's Timestamp Converter shows Unix seconds, Unix milliseconds and UTC ISO 8601 together, so you can compare them without doing the arithmetic. Here's the midnight example from this guide.

Use the labeled results to check that you've read the timestamp as the date you expected.

  1. FluffyBench Timestamp Converter with From set to Unix seconds and Zone set to UTC.
    FluffyBench Timestamp Converter with From set to Unix seconds and Zone set to UTC.
    Step 1. Choose the input unit before pasting. Changing From later rewrites the value already in the box in the new unit.
    1. From: choose Unix seconds to read a seconds count.
    2. Zone: choose UTC for the local display; it also resolves offset-free date text.
  2. Timestamp or date input contains 1726704000; its read-mode label says Read as Unix seconds.
    Timestamp or date input contains 1726704000; its read-mode label says Read as Unix seconds.
    Step 2. Paste the seconds count into Timestamp or date. Results update as you type.
    1. Paste 1726704000.
    2. Confirm Read as Unix seconds.
  3. The same moment shows Thursday 19 September 2024, Unix seconds 1726704000, Unix milliseconds 1726704000000 and UTC ISO 8601 2024-09-19T00:00:00.000Z, with Copy all and row copy buttons.
    The same moment shows Thursday 19 September 2024, Unix seconds 1726704000, Unix milliseconds 1726704000000 and UTC ISO 8601 2024-09-19T00:00:00.000Z, with Copy all and row copy buttons.
    Step 3. Check the calendar date against what you expect. Each row holds a matching representation; Copy all includes every row with its label.
    1. Check Thursday 19 September 2024 at midnight UTC.
    2. Compare Unix seconds, Unix milliseconds and UTC ISO 8601.
    3. Copy all copies the labeled results.
Search FluffyBench