T32 · Draft 0.3

A compact universal timestamp

T32 writes any moment as eight characters: a count of atomic seconds since 2000, in base32. Fewer characters name a longer span, more name finer time, and sorting the text sorts the times.

Try it in the playground Read the specification

  1. · 1 1,089 y
  2. · 2 34 y
  3. · 3 388 d
  4. · 4 12.1 d
  5. · 5 9.1 h
  6. · 6 17.1 min
  7. · 7 32 s
  8. · 8 1 s
  9. · 9 31 ms
  10. · 10 0.98 ms
Now ·········· · each position divides the one before it by 32
PrefixSpanInterval, UTC
·1,089 y····-··-··T··:··:··Z – ····-··-··T··:··:··Z
··34 y····-··-··T··:··:··Z – ····-··-··T··:··:··Z
···388 d····-··-··T··:··:··Z – ····-··-··T··:··:··Z
····12.1 d····-··-··T··:··:··Z – ····-··-··T··:··:··Z
·····9.1 h····-··-··T··:··:··Z – ····-··-··T··:··:··Z
······17.1 min····-··-··T··:··:··Z – ····-··-··T··:··:··Z
·······32 s····-··-··T··:··:··Z – ····-··-··T··:··:··Z
········1 s····-··-··T··:··:··Z – ····-··-··T··:··:··Z

How it works

  1. Count. Take the instant as seconds of International Atomic Time (TAI) since the start of 2000. TAI is the atomic time scale that UTC is derived from, and it has no leap seconds, so every second is the same length.
  2. Offset. Add 239 seconds, about 17,400 years, so that earlier dates are positive too and still sort in order.
  3. Write. Write the result in Crockford base32, five bits to a character. Eight characters count whole seconds; each character added is 32 times finer, each one removed 32 times coarser.
UTC2026-10-31 03:13:00
TAI seconds since 2000846,731,617
Plus 239550,602,545,505
In base32G0S7G6B1

Shorten it to G0S7 and it names the 12 days that contain that second. Each character narrows the span before it by a factor of 32; the playground shows the same steps for any date.

PrefixSpan G 1,089 years G0 34 years G0S 388 days G0S7 12.1 days G0S7G 9.1 hours G0S7G6 17.1 minutes G0S7G6B 32 seconds G0S7G6B1 1 second
Reading G0S7G6B1 from the left. Each character picks one of 32 equal parts of the span before it, so every row is the marked part of the row above, enlarged 32 times.

Properties

Length is resolution
Drop characters for a coarser span, add them for finer time. A stamp stands for a span of time: G0S7 is 12 days, and G0S7G6B1 is one whole second.
Text order is time order
Sorting stamps as plain text puts them in time order, so every stamp that starts with a given prefix falls in one range.
Uniform seconds
T32 counts TAI, which has no leap seconds. From 1961 on, the difference of two stamps is the time elapsed between them.
Exact and stable
Converting from UTC uses the full leap-second table with no rounding, and a stamp written today will mean the same thing in the future.

Compared

FormatThe same secondCharsSorts as textStates resolutionLeap seconds
ISO 8601, UTC2026-10-31T03:13:00Z20Within one format and zonePartlyHas 23:59:60
Unix time179341638010When zero-paddedNoRepeats a second
TAI64 label@400000006ae55ce117YesFixed per variantNone
ULID, time part01M67Z4FK010YesNo, always msFollows Unix time
T32G0S7G6B18YesYes, by lengthNone

Status

T32 is a draft, published for public review. It is complete enough to implement and test against. It won't be frozen until other people have read it, written their own implementations and reported what's wrong with it. The participation page explains how to send comments and what happens to them.

Where to begin

Playground
Type a date or a stamp and see what it means.
Guide
Reading stamps, choosing a length, storing them in SQL, the Rust and TypeScript libraries, and common questions.
Specification
The normative text: definitions, grammar, conversion from UTC and test vectors.
Tables
The alphabet, eras, prefixes by year, durations and leap seconds.
Participate
Open questions, implementations, and the path to version 1.0.