THE TAKEAWAYS

What to take away

  • RFC 3339 defines the Internet date/time format as a narrowed profile of ISO 8601: four-digit years, a T between date and time, and an offset always included.
  • Sorting the strings yields time order only when the offset style and the number of fractional-second digits all match. Convert to time values before comparing.
  • RFC 9557 changed "Z" to mean that the time in UTC is known but the local offset is unknown. "+00:00" still means UTC is the preferred reference point.
  • RFC 9557 lets you append a time zone name such as [Asia/Tokyo]. Copying the offset into a name such as [+09:00] is strongly discouraged.
  • Put the date/time rules on one page, and in acceptance checks with your contractor, test sorting and comparison with mixed offsets and differing fraction digits.

FROM PRIMARY SOURCES

Why writing "ISO 8601 format" does not settle it

RFC 3339 opens by noting that date and time formats cause a lot of confusion and interoperability problems on the Internet. It then defines a profile of ISO 8601 for timestamps of Internet protocol events.

ISO 8601 is a broad standard that allows many representations. RFC 3339 judges the complete grammar too complex for most Internet protocols and achieves simplicity by making most fields and punctuation mandatory. A specification that says only "ISO 8601 format" loses this narrowing.

Human readability also hurts interoperability. RFC 3339 gives "10/11/1996" as an example of a format completely unsuitable for global interchange because it is read differently in different countries. Display formats and exchange formats need to be considered separately.

RFC 3339 covers expressions of an instant in time; time periods and intervals are out of scope. Even for APIs that handle periods, such as booking start and end, align both endpoints in this format and define the period rules separately.

RFC 3339 also assumes that every time has a stated relationship, an offset, to UTC. Not exchanging dates and times without an offset, where you cannot tell which local time is meant, is the starting point for the rest of this article.

Sources: [1]

FROM PRIMARY SOURCES

The RFC 3339 format: four-digit years, T and a mandatory offset

Section 5.6 of RFC 3339 defines the format that should be used in new Internet protocols: a year-month-day date and an hour:minute:second time joined by T, followed by an offset. The offset is either "Z", meaning UTC, or a numeric value such as "+09:00". Fractional seconds may follow a ".".

Internet protocols must generate four-digit years, and two-digit years are deprecated. Hours run from 00 to 23; the hour "24" that ISO 8601 permits is not allowed in this profile. All dates and times used in Internet protocols must be fully qualified.

T and Z may be lower case, but RFC 3339 says applications that generate this format should use upper case. Deciding that receivers accept lower case while senders send upper case reduces confusion.

Fractional seconds are the only rarely used option in the format. RFC 3339 notes that rarely used options are less likely to be tested and so cause interoperability problems, and recommends making them mandatory or omitting them where possible. For an API, decide whether to use fractions and, if so, how many digits.

Information that can be computed from the date, such as the day of the week, should not be included either. RFC 3339 says redundant information introduces the possibility that it will not correlate, so the day of the week should not be part of a date/time format.

Sources: [1]

FROM PRIMARY SOURCES

Sorting as strings works only when conditions match

The RFC 3339 format orders components from least precise to most precise: year, month, day, hour, minute, second. Section 5.1 explains that this gives a useful property: sorting the strings can produce time order.

The property has conditions: the time zones must be the same, expressed with the same string (all "Z" or all "+00:00", for example), and all times must have the same number of fractional-second digits. If any of these differ, string order and time order do not match.

For example, "2026-11-24T09:00:00+09:00" and "2026-11-24T01:00:00Z" denote the same instant, yet as strings the first sorts after the second. Values with different fraction digits, such as "...:00.5Z" and "...:00Z", may also sort unexpectedly.

So when comparing or sorting received timestamps, convert them to time values, such as elapsed time from a UTC epoch, rather than comparing strings. Normalising the format at storage time also helps, but one path that skips normalisation is enough to break the order.

The offset itself is defined in section 4.2 of RFC 3339 as local time minus UTC. For example, 18:50:00 with an offset of minus four hours is the same time as 22:50:00 in UTC.

Sources: [1]

FROM PRIMARY SOURCES

"Z" and "+00:00" mean different things: the RFC 9557 update

RFC 3339 in 2002 said that an offset of "Z" or "+00:00" implies UTC is the preferred reference point for the time, and that "-00:00" expresses that the time in UTC is known but the offset to local time is unknown.

RFC 9557 updated this to match actual practice. Because ISO 8601:2000 and later do not allow "-00:00", implementations that needed that meaning tended to use "Z" instead. After the update, "Z" represents a time whose UTC value is known but whose local offset is unknown.

The meaning of "+00:00" is not updated; it still implies UTC is the preferred reference point. Under the current rules, then, "Z" means the local offset is unknown, while "+00:00" means UTC is the reference.

Few systems use this distinction in practice. Even so, if you need to show a user later the local time at which they acted but convert it to "Z" at storage time, the local offset is lost. It is important to write into the API rules which fields must keep the local offset.

RFC 9557 notes that because ISO 8601:2000 and later do not allow "-00:00", that syntax reduces interoperability, but it does not formally deprecate it. For a new API it is practical to choose the syntax by meaning, "Z" when the local offset is unknown and "+00:00" when UTC is the reference, and to make receivers able to read both.

Sources: [2][1]

FROM PRIMARY SOURCES

Appending time zone names, and why to avoid names that only copy the offset

RFC 9557 defines a way to append additional information in square brackets after an RFC 3339 timestamp. A typical use is an IANA time zone name such as [Asia/Tokyo] or [Europe/Paris]. The suffix is optional, so timestamps without it remain ordinary RFC 3339 timestamps.

An offset and a time zone are different things. RFC 9557 explains that a timestamp's offset makes no claim about the offset of other timestamps, so it is unsuitable for local-time operations such as "one day later"; in regions with daylight saving time, the offset can change from one day to the next.

RFC 9557 therefore strongly discourages offset time zones such as [+01:00]. In particular, programs must not copy the offset from a timestamp into an offset time zone to satisfy another program that requires a suffix. Doing so improperly asserts that the offset in that location will never change, and adding six months can then be off by one hour.

Suffix tags are elective by default, so the recipient may ignore them. A tag marked with "!" right after the opening bracket is critical, and the recipient must not act on the timestamp unless it can process that tag. If, for example, the offset and the time zone name disagree and the tag is marked critical, the recipient must reject the data or perform other error handling.

For time zone names, RFC 9557 refers to the names in the IANA Time Zone Database, most named after the largest city in a region, such as Asia/Tokyo. Because the rules behind a name can change over time, using a name signals the intent that the rules current at the time of interpretation apply.

Sources: [2]

EDITORIAL PRACTICE

Editorial recommendation: put the date/time rules on one page

From here on, these are our editorial recommendations based on the two RFCs. First, for each date/time field exchanged by your APIs and integrations, summarise the rules in a one-page table. It makes the meaning of each field clearer than writing "all RFC 3339".

For each field, record the name, its meaning (creation time, deadline, booking start and so on), the format sent, how the offset is handled, the number of fractional digits, whether a time zone name is appended and how values are compared. The table below is an example.

The table shows that fields called "date-time" differ in nature. Record timestamps may be fine in UTC, while deadlines and bookings depend on which region's local time is meant. For the latter, consider whether the local offset or a time zone name must be kept.

Date-only fields, such as birthdays or business days, are not instants at all. Do not force them into the RFC 3339 date-time format; treat them as dates and state which region's date they are.

Review the table whenever integrations or fields are added. When sender and receiver are different companies, review it together and agree to notify each other of changes.

Example API date/time rules (fictional example; fields and values are for illustration and do not belong to any real service)
Example fieldFormat sentOffset / time zoneHow to compare
Created atRFC 3339, three fractional digits, upper-case T and ZSend in UTC with ZConvert to time values
Updated atSame as created atSend in UTC with ZConvert to time values
Application deadlineRFC 3339, to the secondInclude the local offset and, if needed, a time zone nameCompare as time values; display in local time
Booking start and endRFC 3339, to the secondAppend a time zone name (e.g. [Asia/Tokyo])Calculate in local time; compare as time values
Business dayDate only (year-month-day)State the region in the tableCompare as dates

Sources: [1][2]

EDITORIAL PRACTICE

Editorial recommendation: run acceptance checks with mixed offsets

When a contractor implements date/time handling, acceptance checks should use mixed timestamps, not just neatly aligned ones. Tests with aligned values only will not reveal the problems described above.

Prepare test data with the same instant written with "+09:00" and with "Z", with differing fractional digits, with lower-case t or z, without an offset, with a two-digit year, and with a time zone name that disagrees with the offset. For each, check that the sort result and the accept-or-reject result are as expected.

Check the display too. RFC 3339 says clients should be prepared to transform dates into a display format suitable for the locality. Separate the roles, RFC 3339 for storage and exchange and the user's locale for display, and test that the display conversion does not rewrite the exchange format.

Record the timestamps used, the expected results and the actual results. Make these tests automated so they run whenever date/time handling changes, which stops the same drift from creeping back in.

Writing items such as "follow the date/time rules table", "compare as time values" and "pass the mixed-timestamp tests" into the contract or acceptance criteria makes the scope of checks clear.

Sources: [1][2]

EDITORIAL PRACTICE

Editorial recommendation: migrating existing data with mixed formats

If timestamps in mixed formats are already stored, start by fixing comparisons rather than rewriting everything at once. Once sorting and comparison use time values, ordering errors stop immediately even if the stored formats differ.

Then align newly stored timestamps with the table's rules and plan a gradual migration of old data. When you find timestamps without an offset, record which region's time they are treated as before fixing them; guessing an offset makes errors harder to see.

During migration, old and new formats coexist. For that period only, let receivers read both, and agree with partners when the old format will be retired so the end of the migration is clear.

In operation, counting received timestamps that break the table's rules helps you notice partner changes or bugs early. If timestamps without offsets start increasing from a certain day, for example, it suggests the partner's system has changed.

Finally, time zone rules can change through political decisions. RFC 9557 notes that inconsistencies between offset and time zone name can arise from such decisions, from updates applied at different times, or from program errors. If you handle future bookings and similar times, keep time zone data up to date as part of operations.

Sources: [1][2]

WITH OPERUN.

Delegate everyday AI management.

Writing "ISO 8601 format" does not settle API dates and times. RFC 3339 defines a format with four-digit years, T and a mandatory offset, and explains that sorting strings is safe only when offset styles and fraction digits match. RFC 9557 changes "Z" to mean the local offset is unknown, adds a way to append time zone names, and strongly discourages names that merely copy the offset. Put field-by-field rules on one page, compare as time values, and run mixed-timestamp tests in acceptance checks with your contractor. Then date/time drift becomes a problem prevented by rules and tests, not an occasional display bug.

Discuss your product and AI work

Primary sources

Sources checked on 24 November 2026. The workflows and checklists are editorial proposals.

  1. [1]
  2. [2]

Share this insight