ISO 8601 date and time format, with examples
ISO 8601 writes dates as YYYY-MM-DD and times as hh:mm:ss, with Z or ±hh:mm for the time zone. The current time in ISO format, examples of every common form, week dates, durations, and RFC 3339.
The common ISO 8601 formats
All examples show the same instant, 14:30 UTC on 2026-03-15. The extended format (with - and :) is easier to read; the basic format omits the separators and is used in file names and some protocols.
| Form | Example | Notes |
|---|---|---|
| Date | 2026-03-15 | Year-month-day, always four-digit year |
| Date (basic) | 20260315 | No separators |
| Time | 14:30:00 | 24-hour clock; seconds optional (14:30) |
| UTC date-time | 2026-03-15T14:30:00Z | Z means UTC (“Zulu”) |
| With fractions | 2026-03-15T14:30:00.000Z | Decimal seconds after a dot |
| New York local time | 2026-03-15T10:30:00-04:00 | Offset for that date (UTC−4) |
| Tokyo local time | 2026-03-15T23:30:00+09:00 | Same instant, UTC+9 |
| Week date | 2026-W11-7 | ISO week number and weekday (1 = Monday) |
| Ordinal date | 2026-074 | Day of the year |
| Duration | P1DT2H30M | 1 day, 2 hours, 30 minutes |
| Interval | 2026-03-15T09:00Z/2026-03-15T17:00Z | Start and end separated by a slash |
Time zones in ISO 8601: Z and offsets
A timestamp ending in Z is UTC. One ending in +05:30 or −04:00 gives the local time and its difference from UTC, so 2027-07-15T10:00:00-04:00 and 2027-07-15T14:00:00Z are the same instant. A timestamp with no suffix is “local time” of unknown zone, which is ambiguous; avoid it for anything stored or exchanged.
An offset is not a time zone. −04:00 is New York in summer but also Santiago in winter and Halifax in winter. Store UTC (or an offset) for the instant, and keep the IANA zone name, such as America/New_York, separately if you need to know future local times, because offsets change with daylight saving.
Note the sign: ISO 8601 offsets are positive east of Greenwich, the opposite of the POSIX-style Etc/GMT+5 identifiers, which mean UTC−5.
ISO 8601 and RFC 3339
RFC 3339 is a stricter profile of ISO 8601 used by internet protocols and most APIs. It requires a full date, a full time and an offset or Z, as in 2027-01-15T14:30:00Z. It allows a space instead of the T for readability and does not allow week dates, ordinal dates or reduced precision.
JavaScript’s Date.prototype.toISOString(), Python’s datetime.isoformat(), and SQL timestamp literals all produce RFC 3339-compatible strings.
| Language | Code |
|---|---|
| JavaScript | new Date().toISOString() |
| Python | datetime.now(timezone.utc).isoformat() |
| Java | Instant.now().toString() |
| C# | DateTime.UtcNow.ToString("o") |
| PHP | gmdate('Y-m-d\TH:i:s\Z') |
| Go | time.Now().UTC().Format(time.RFC3339) |
| Shell (GNU) | date -u +%Y-%m-%dT%H:%M:%SZ |
| PostgreSQL | to_char(now() at time zone 'utc', 'YYYY-MM-DD"T"HH24:MI:SS"Z"') |
Why use it
03/04/2027 is 3 April in Britain and March 4 in the United States. 2027-04-03 means only one thing. Because the largest unit comes first and every field has a fixed width, ISO dates sort chronologically as text, which makes them ideal for file names, spreadsheets and logs.
ISO week numbers are used for planning in much of Europe. Week 1 is the week containing the year’s first Thursday, so 1–3 January can belong to the last week of the previous year.
Questions
What is the ISO 8601 date format?
YYYY-MM-DD, for example 2027-01-15. The year comes first, then the month and day, each with a fixed number of digits.
What does the T mean in an ISO 8601 timestamp?
T separates the date from the time: 2027-01-15T14:30:00. RFC 3339 also allows a space.
What does Z mean at the end of a timestamp?
Z means the time is in UTC, the zero offset (called “Zulu” in aviation). 14:30:00Z is the same as 14:30:00+00:00.
How do I write a time zone in ISO 8601?
Add Z for UTC or the offset from UTC as ±hh:mm, for example 2027-01-15T09:30:00-05:00 for New York in winter. ISO 8601 has no field for zone names such as EST.
Is ISO 8601 the same as RFC 3339?
RFC 3339 is a subset of ISO 8601 for internet use. Every RFC 3339 timestamp is valid ISO 8601, but ISO 8601 allows more forms, such as week dates and reduced precision.
What week number is it?
The live box at the top of this page shows today’s ISO week date. ISO weeks start on Monday, and week 1 contains the first Thursday of the year.
Use the time converter to check a specific date, or the meeting planner to compare working hours.
Sources & further reading
- ISO: ISO 8601 date and time format
- RFC 3339: Date and Time on the Internet: Timestamps
- MDN: Date.prototype.toISOString()
Time zone rules and identifiers: IANA Time Zone Database. Time standards and clock terminology: NIST Time of Day FAQs. See how our converter calculates time for implementation details and limitations.
