{
  "id": "sc_6e27934f26d443e99302a5b51034d11a",
  "url": "https://speccommons.org/s/compact-utc",
  "schema": "https://speccommons.org/s/definition-record",
  "slug": "compact-utc",
  "title": "Compact UTC timestamps",
  "summary": "UTC instants as digits, with trailing default components omitted. The timestamp convention used by this registry.",
  "content": "## Purpose\n\nRepresent a UTC instant at whole-second precision using decimal digits, with trailing default components omitted. This convention is intended for applications that explicitly agree to use it. It is not ISO 8601, and ordinary date parsers must not be expected to understand it.\n\n## Encoding\n\nStart with `YYYYMMDDhhmmss`: a four-digit year followed by two-digit month, day, hour, minute and second, in that order. All digits are ASCII. Always interpret the instant in UTC using the proleptic Gregorian calendar.\n\nRemove trailing components, one at a time, while they equal their defaults:\n\n| Component | Default when omitted |\n| --- | --- |\n| Month | `01` |\n| Day | `01` |\n| Hour | `00` |\n| Minute | `00` |\n| Second | `00` |\n\nThe year is never omitted and remains exactly four digits. Only a suffix may be omitted. Stop as soon as the final remaining component differs from its default. The resulting shortest representation is the canonical encoding.\n\n## Decoding and validity\n\nAccept a string of exactly 4, 6, 8, 10, 12 or 14 digits. Supply defaults for omitted trailing components. Leading zeros are required. A valid, non-shortest representation decodes to the same instant, but a canonical encoder must shorten it.\n\nYears range from `0001` through `9999`. Months range from `01` through `12`. Days must exist in the specified month and year. Leap years are divisible by 4, except years divisible by 100 unless also divisible by 400. Hours range from `00` through `23`; minutes and seconds from `00` through `59`.\n\nReject invalid dates, extra digits, signs, separators, whitespace, fractional seconds, offsets and leap-second values. Never normalise an invalid date into a different date. This format does not represent reduced precision: `2026` means the exact instant 2026-01-01T00:00:00Z.\n\n## Examples and test vectors\n\n| UTC instant | Canonical encoding |\n| --- | --- |\n| 2026-10-19T11:00:00Z | `2026101911` |\n| 2026-10-19T00:00:00Z | `20261019` |\n| 2026-10-01T00:00:00Z | `202610` |\n| 2026-01-01T00:00:00Z | `2026` |\n| 2026-01-01T00:00:01Z | `20260101000001` |\n| 2024-02-29T23:59:59Z | `20240229235959` |\n| 0001-01-01T00:00:00Z | `0001` |\n\n`20261019110000` is valid but noncanonical; canonicalise it to `2026101911`.\n\nInvalid inputs include `0000`, `20260229`, `19000229`, `202613`, `2026101924`, `202610191160`, `20261019115960`, `20261`, `2026-10-19` and `2026101911Z`.\n\n## Tradeoffs\n\nWhole-second precision only. The convention carries no timezone information because UTC is required. Compactness varies with the values: 2026-10-19T11:23:45Z still needs 14 digits. Encode as a string to preserve leading zeros and interoperability. Variable-length encoded strings must be decoded before chronological sorting; lexical sorting is not reliable across all accepted encodings. A schema or integration instruction must explicitly reference this definition.\n\n## Use in Spec Commons\n\nThe `published_at` field in the [definition record](/s/definition-record) uses this convention. It records publication time, without promising uniqueness or serving as a record identifier.\n",
  "publisher": "pub_6a8db374fd1b44dabc7bd6a562b01cd4",
  "published_at": "20261022163945",
  "parent": null,
  "change_note": null,
  "references": []
}
