RFC 3339 or ISO 8601
RFC 3339 is a profile of ISO 8601 for timestamps on the internet, and it is what OpenAPI and JSON Schema mean by the date-time format: an API that documents a field that way promises RFC 3339. It is stricter than ISO 8601 in some ways and looser in others:
| Timestamp | RFC 3339 | ISO 8601 | Why |
|---|---|---|---|
2026-11-21T10:15:00Z | Yes | Yes | The common form of both |
2026-11-21T10:15:00.123+01:00 | Yes | Yes | Fractions and numeric offsets are fine in both |
2026-11-21 10:15:00Z | Yes | No | RFC 3339 lets applications use a space for readability; ISO 8601 needs T |
2026-11-21t10:15:00z | Yes | No | RFC 3339 accepts lower-case t and z |
2026-11-21T10:15 | No | Yes | RFC 3339 requires seconds |
2026-11-21T10:15:00 | No | Yes | RFC 3339 requires Z or an offset |
20261121T101500Z | No | Yes | Basic format without separators is ISO 8601 only |
2026-W47-6 | No | Yes | Week dates are ISO 8601 only |
Every check also confirms the date exists: 2026-02-29 fails, 2024-02-29 passes, and hours, minutes and offsets must be in range.
Edge cases that break tests
Testing date handling
Feed these cases to every parser at your system's edges: API request bodies, query strings, CSV imports and log ingestion. For which time zones and dates to run a suite under, see the time zone test matrix builder.
Sources
Get new posts by email.
Occasional email with new Testland posts and plugin releases.
Unsubscribe any time. Privacy policy