Skip to content

Datetime Formats Explained

The datetime formats developers actually meet — ISO 8601, RFC 3339, RFC 2822, Unix time, and database types — with anatomy, timezone behavior, and parsing gotchas.

Every API, database, and log line speaks a different datetime dialect, and each one fails differently. This sheet maps the formats you meet daily: anatomy, timezone behavior, and the parsing gotchas that bite. Examples use the instant 2026-09-05T12:34:56Z where possible, so you can compare dialects directly.

Reference table · 26 entriesOpen the timestamp tool →
26 of 26 rows
ISO 8601
Calendar date2026-09-05None — names a day, not an instant.Sorts correctly as a plain string; ambiguity starts only when someone writes 09/05/2026.
Local date-time2026-09-05T12:34:56Unknown — offset deliberately omitted.Local to whom? Never store this form when the zone matters; normalize to UTC first.
UTC designator2026-09-05T12:34:56ZFixed UTC — Z means +00:00 exactly.Z is an offset, not a timezone; parsers accept a lowercase z unevenly.
Numeric offset2026-09-05T12:34:56+02:00Explicit offset from UTC, same instant as the Z form.An offset is not a zone: CEST becomes CET in October, +02:00 does not follow it.
Fractional seconds2026-09-05T12:34:56.789ZFixed UTC.ISO permits a comma separator and any digit count; JavaScript Date silently drops digits below milliseconds.
ISO week date2026-W36-6None — a calendar scheme.The week-numbering year drifts at year edges: 2027-01-01 is 2026-W53-5.
Ordinal date2026-248None — day 248 of the year.Leap years shift every ordinal after day 59; mixing ordinal math with month math fails quietly.
RFC 3339
date-time, UTC2026-09-05T12:34:56ZOffset required — Z or ±HH:MM, nothing else.A strict ISO 8601 profile: the spec allows a space instead of T by agreement, but many parsers reject it.
date-time, offset2026-09-05T14:34:56+02:00Any offset; denotes the same instant as the Z form.Rendering in another zone changes the string, never the instant — compare instants, not strings.
date-time, unknown offset2026-09-05T12:34:56-00:00UTC value with an unknown local offset.-00:00 is a convention, not arithmetic zero: some libraries normalize it to +00:00, some reject it outright.
date-time, fractional2026-09-05T12:34:56.123456ZFixed UTC.The ABNF allows only a dot separator — ISO's comma form is invalid here; digit count is unbounded.
Lowercase t/z2026-09-05t12:34:56zSame meaning as uppercase.Legal per the spec, but strict validators and SQL casts reject it; uppercase before storing.
RFC 2822 (email)
Canonical Date headerSat, 05 Sep 2026 12:34:56 +0000Numeric offset ±HHMM — no colon.Day and month are always English abbreviations; a numeric month makes the value invalid.
Obsolete zone nameSat, 05 Sep 2026 07:34:56 ESTNamed zones (GMT, UT, EST…) map to fixed offsets.Names carry no DST rules and military zones are listed as erroneous in the spec — always emit numeric offsets.
Obsolete syntax5 Sep 2026 12:34 +0200Same offset rules, relaxed shape.obs- forms drop the weekday and the seconds; strict parsers reject them, mail libraries accept them.
Minus-zero offsetSat, 05 Sep 2026 12:34:56 -0000UTC with the sender's local zone unknown.Distinct in meaning from +0000 (RFC 5322 §3.3), identical in arithmetic — sorting treats them the same.
Unix time
Epoch seconds1788611696Zone-free — a count of UTC seconds.Equals 2026-09-05T12:34:56Z; this is the unit of C time_t, Python, and SQL EXTRACT(EPOCH …).
Epoch milliseconds1788611696000Zone-free.JavaScript's Date unit — send it where seconds are expected and dates land millennia away.
Epoch microseconds1788611696000000Zone-free.Postgres uses µs, Go and Java ns — always name the unit; the digits alone cannot tell you.
Pre-epoch (negative)-14182940Zone-free.Instants before 1970 go negative (this is Apollo 11's touchdown); CSV and spreadsheet exports mangle the minus sign.
Leap second2016-12-31T23:59:60ZExists in UTC only.Has no Unix second — epoch math assumes 86,400-second days; Google smears the extra second instead.
Database & legacy
PostgreSQL TIMESTAMPTZ2026-09-05 14:34:56+02Converted to UTC on write, rendered in the session TimeZone on read.The stored offset is display metadata, not fact — the column holds an instant, not a wall time.
MySQL DATETIME2026-09-05 12:34:56None — stores literal wall time.The offset is dropped on insert and nothing converts on read; the application's zone leaks in silently.
MySQL TIMESTAMP2026-09-05 12:34:56Stored as UTC, converted by the session time_zone on read.Range capped at 2038-01-19 03:14:07 UTC — inserts beyond it fail.
Excel serial date46270None — days since 1899-12-30, fraction of a day is the time.Serial 60 is the fake Feb 29, 1900 that never happened; dates at or after serial 61 are safe.
HTTP-dateSat, 05 Sep 2026 12:34:56 GMTFixed GMT — an offset is not allowed.RFC 9110 requires this exact IMF-fixdate shape; cookies still arrive in older two-digit-year variants.