Glossary

ISO 8601

ISO 8601 is an international standard for representing dates and times as unambiguous, sortable strings — YYYY-MM-DD for a date, YYYY-MM-DDTHH:MM:SS for a date and time, optionally with a time zone offset or a trailing Z for UTC. It's published by the International Organization for Standardization, and RFC 3339 defines a stricter, internet-focused profile of it that most web APIs actually implement.

How it works

The format is designed so that lexical (string) sorting matches chronological sorting, and so no reader can mistake which part is the day versus the month — the classic ambiguity between 03/04/2026 (March 4th or April 3rd, depending on locale) doesn't exist in ISO 8601:

2026-09-29                 → date only
2026-09-29T14:30:00Z       → date + time, UTC ("Z" = zero offset)
2026-09-29T10:30:00-04:00  → same instant, explicit -4h offset
2026-09-29T14:30:00.500Z   → with fractional seconds

The T separates the date and time portions; a time zone offset (+HH:MM/-HH:MM) or the literal Z for UTC is required for the string to represent an unambiguous instant rather than just a "wall clock" reading with no zone attached. ISO 8601 also defines duration (P1DT2H) and interval notations, though those see far less real-world use than the date/time formats.

Common pitfalls

  • A timestamp with no offset and no Z (2026-09-29T14:30:00) is technically incomplete per the strict standard — always include a zone/offset when the value needs to represent one specific instant.
  • RFC 3339 (the profile most APIs follow) is slightly stricter than full ISO 8601 — it requires the offset and disallows some of ISO 8601's more exotic options (like week-numbering dates), so "ISO 8601" and "RFC 3339" aren't perfectly interchangeable claims.
  • Locale-formatted dates (Intl.DateTimeFormat output, or anything showing month names) are not ISO 8601 — the standard's whole point is a fixed, non-localized representation.
  • Excel and some spreadsheet tools reformat ISO 8601 strings into locale date formats on paste, silently discarding the timezone information.

Related terms

  • Unix timestamp — the numeric, timezone-free equivalent that an ISO 8601 string is often converted to and from.
  • UTC — the time zone ISO 8601's Z suffix specifically denotes.
  • Cron expression — schedules expressed with cron fields are often logged or reported back to users as ISO 8601 timestamps for the actual run time.

See also