ISO 8601 Guide

Adopt the timestamp format that never lies.

Structural basics

ISO 8601 expresses dates as YYYY-MM-DD and times as hh:mm:ss with optional fractions. Combine them using T in the middle: 2026-02-22T18:45:00. Append a timezone indicator at the end. Z stands for UTC (Zulu). Offsets look like +02:00 or -07:00. Because the components are always in the same order, string sorting matches chronological sorting.

Examples worth memorizing

Example: Deployment notice

“Deployment window: 2026-03-10T01:00:00Z–2026-03-10T02:00:00Z.” Everyone can convert from UTC, and the dash makes the interval explicit. If you must mention a local time, include it in parentheses: “(20:00–21:00 New York).”

Example: Local offset string

“Office hours: 2026-04-05T09:00:00+10:00.” The +10:00 offset shows that the slot is tied to an Australian Eastern Daylight Time schedule. When daylight saving ends, you update the offset to +09:00 or switch to UTC to avoid confusion.

Parsing and validation

Browsers provide Date.parse(), but its behavior varies by locale. A safer workflow is to paste the ISO string into the Epoch converter. The tool validates structure, surfaces the epoch equivalent, and lets you copy the string into another timezone instantly. For bulk jobs, rely on language libraries (Luxon, date-fns, Temporal) that explicitly consume ISO 8601.

Durations and recurrences

ISO 8601 also defines durations like P3DT4H (3 days, 4 hours) and recurring intervals such as R5/2026-02-22T10:00:00Z/P1D (repeat five times starting Feb 22, once per day). These forms appear in calendar exports, ICS feeds, and workflow automation platforms. When troubleshooting, break the string apart: R indicates repeats, the slash separates the start timestamp from the period.

Common mistakes

Patterns you should keep handy

Date only: 2026-02-22. Ideal for deadlines that span whole days. Date + time UTC: 2026-02-22T18:45:00Z. Use for runbooks and deploy windows. Date + local offset: 2026-02-22T18:45:00-05:00. Use when an event is tied to a specific city’s legal time, such as a contractually mandated maintenance window. Keep these three in a snippet file so you can paste without thinking.

Try the tool

Drop any ISO string or epoch value into the Epoch tool to convert formats, verify offsets, or copy UTC "Z" timestamps for your runbooks.

FAQ

Can I omit seconds?
Yes. ISO allows 2026-02-22T18:45Z. Include seconds when precision matters to avoid assumptions.
What is the lowercase t I see sometimes?
Some systems accept lowercase t and z. Stick to uppercase for reliability.
Why do ICS files look different?
ICS uses a compact form (e.g., 20260222T184500Z). It is still ISO 8601 under the hood, just without dashes and colons.

Related guides