Logo

ISO 8601 date and time format, with examples

Time Now Team
Time Now Team
Published: 11/11/2026
Updated: 11/11/2026
ISO 8601 date and time format, with examples

ISO 8601 writes dates from the largest unit to the smallest, so 6 February 2027 at 14:30 UTC becomes 2027-02-06T14:30:00Z. The standard was first published in June 1988, and the edition in force is ISO 8601-1:2019 and ISO 8601-2:2019, with an amendment to Part 1 in October 2022. Because the order runs year, month, day, hour, minute, second, ISO 8601 strings sort correctly as plain text and never leave a reader guessing whether 03/04 means March 4 or April 3.

ISO 8601 format at a glance

The ISO 8601 format joins a date (YYYY-MM-DD) and a time (hh:mm:ss) with the letter T, then adds Z for UTC or an offset such as +07:00. All four examples below describe the same moment, Saturday 6 February 2027 at 14:30 UTC.

Element Pattern Example
Date YYYY-MM-DD 2027-02-06
Time hh:mm:ss 14:30:00
Date and time in UTC YYYY-MM-DDThh:mm:ssZ 2027-02-06T14:30:00Z
Date and time with offset YYYY-MM-DDThh:mm:ss±hh:mm 2027-02-06T21:30:00+07:00

How ISO 8601 writes dates

A calendar date is YYYY-MM-DD in extended format (2027-02-06) or YYYYMMDD in basic format (20270206). ISO 8601 also defines week dates, written YYYY-Www-D, and ordinal dates, written YYYY-DDD, where DDD is the day of the year from 001 to 365 or 366.

According to Wikipedia, the standard advises against basic format in plain text.

For 6 February 2027 the three forms are:

  • Calendar date: 2027-02-06
  • Week date: 2027-W05-6 (ISO week 5, day 6, where Monday is 1 and Sunday is 7)
  • Ordinal date: 2027-037 (the 37th day of 2027)

ISO week 1 is the week that contains the year's first Thursday. To see which ISO week a given date falls in, use the current week number page.

Times, UTC and offsets

Times use the 24-hour clock as hh:mm:ss, and the letter T separates them from the date. A trailing Z means the time is in UTC with zero offset. Any other zone is written as a signed offset, +hh:mm or -hh:mm, after the time.

ISO 8601 accepts offsets as ±hh:mm, ±hhmm or ±hh. A zero offset cannot be written -00:00. New York standard time is -05:00, so 2027-02-06T09:30:00-05:00 equals 2027-02-06T14:30:00Z. The current UTC page shows the reference clock that Z points to, and pilots read the same letter aloud as "Zulu," as explained on the Zulu time page.

The same instant in Vietnam, Thailand or western Indonesia is 2027-02-06T21:30:00+07:00. The UTC+7 page lists every place that uses that offset.

Midnight has two spellings. 00:00:00 is the start of a day, and 24:00:00 is the end of the previous one. The 2019 edition removed 24:00:00, and the October 2022 amendment brought it back, according to Wikipedia. Second 60 is reserved for leap seconds.

Durations and intervals

A duration starts with P and lists amounts by unit: PnYnMnDTnHnMnS. P3Y6M4DT12H30M5S means 3 years, 6 months, 4 days, 12 hours, 30 minutes and 5 seconds. The T inside a duration separates date units from time units, so P1M is one month and PT1M is one minute.

Intervals join two parts with a slash. ISO 8601 allows four forms:

  • Start and end: 2027-02-06T14:30:00Z/2027-02-07T02:30:00Z
  • Start and duration: 2027-02-06T14:30:00Z/PT12H
  • Duration and end: PT12H/2027-02-07T02:30:00Z
  • Duration only: PT12H

ISO 8601 vs RFC 3339 vs Unix time

RFC 3339 is a stricter profile of ISO 8601 written for internet protocols. Unix time is a different system: a single count of seconds since 1970-01-01T00:00:00Z. The ISO 8601 string 2027-02-06T14:30:00Z and the Unix value 1801924200 describe the same instant.

RFC 3339 differs from ISO 8601 in four ways, according to Wikipedia: it allows a space in place of T, it excludes week dates and ordinal dates, it excludes durations, and it permits -00:00 to mean an unknown local offset.

A utc timestamp usually means one of these two forms. The Unix time converter turns one into the other, and what is Unix time explains how the count works and why it ignores time zones.

Common ISO 8601 mistakes

The three errors that break the most code are leaving out the offset, adding Z to a local time, and mixing ISO week years with calendar years. All three pass a format check and still point to the wrong moment.

  1. No offset: 2027-02-06T14:30:00 has no zone, so a server in Hanoi and a server in London will read it as two moments 7 hours apart.
  2. Fake Z: writing 2027-02-06T21:30:00Z for 21:30 Hanoi time shifts the event 7 hours late. Write +07:00 or convert to UTC first.
  3. Week-year edge: 1 January 2027 is a Friday, so it belongs to ISO week 2026-W53-5, not to week 1 of 2027. ISO week 1 of 2027 starts on Monday 4 January. Formatting a date with the week-year field instead of the calendar year (in Java, uppercase YYYY means week year) prints "2026" on that day.

Which years have 53 weeks is covered on the ISO week numbers page.

Frequently Asked Questions

The T marks the point where the date ends and the time begins, as in 2027-02-06T14:30:00. The 2019 edition removed the old option to drop the T by mutual agreement, so a strict ISO 8601 parser expects it. RFC 3339 is looser and also accepts a space, which is why some databases print 2027-02-06 14:30:00.

The Time Now Team runs timenow.zone and writes its time zone guides, daylight saving time articles and city pages in English and Vietnamese. The team works for PA MOBILE TECHNOLOGY COMPANY LIMITED in Ho Chi Minh City, Vietnam. Every offset, abbreviation and clock change date we publish is checked against the IANA Time Zone Database, the same data your phone uses. Every conversion example is calculated before it goes live. When a country changes its time rules, we update the pages it affects.