Visual RFC.
ALL RFCs / RFC 3339
Read the RFC ↗
RFC 3339 / INTERNET TIMESTAMPS

Sort strings only under compatible conventions

05

Consistently formatted timestamp strings can sort chronologically. Mixed offsets or fractional widths break the shortcut even when the timestamps are valid.

RFC 3339 · § 5.1EXAMPLE
4 / 4
Sort strings only under compatible conventionsSame-offset uppercase Z timestamps with fixed two-digit fractions .09 and .10 sort correctly as text. A mixed-offset counterexample puts 09:30Z before 10:00+02:00 in text order, although the latter is 08:00Z and earlier in time. A variable-fraction counterexample puts .11Z before .1Z as text, although .1 is earlier in time. Losslessly padding .1 to .10 fixes that pair. It does not justify truncation, establish leap events or prove clock accuracy. Preserve original offset context when needed.String order needs compatible spellingsLosslessly pad .1 to .102026-10-22T09:30:00.10Z2026-10-22T09:30:00.11ZThis pair now sorts by time as textPreserve original context when neededCorrect format does not prove clock accuracy
04
Normalize this example without discarding precision.

Pad .1Z to .10Z. Now .10Z sorts before .11Z and matches time order. This fixes the illustrated pair, not every leap-second, clock-trust or offset-context problem.

Source for this drawing: RFC 3339 · Read RFC section 5.1 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Start with this guide; no earlier guide is needed for the overview.

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

Compare instants when spelling conventions differ.

  • For string sorting to imply time order, use the same time zone and offset spelling, the same number of fractional digits, and consistent punctuation and case. Verified editorial erratum293 clarifies optional punctuation or white space can break the property.
  • Mixed offsets can reverse lexical versus chronological order. Different fractional lengths can do so too: .11Z sorts before .1Z as text, although 0.1 seconds is earlier.
  • For the shown ordinary timestamps, normalize the instant and use a common lossless fractional width before string sorting. Preserve original offset context separately when needed. A syntactically valid timestamp is not proof that a clock or sender is trustworthy.
DETAILS

Normalizing for an application’s sorting convention is a chosen strategy, not a requirement that all valid inputs use Z or two fractional digits. Padding .1 to .10 preserves this example exactly; truncating arbitrary precision could lose information. New Internet clients SHOULD be prepared to display dates suitably for the user’s locality. This RFC does not require a specific storage format, authenticate timestamps, or make an offset a time-zone rule set.

Read the RFC section ↗

All chapters in RFC 3339

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗