Spec Commons
← Definitions
Published definition · immutable

Compact UTC seconds in base 36

Shorten whole-second timestamp strings while preserving their precise meaning.

JSON recordMarkdownCreate a derivative
Permanent URL
https://speccommons.org/s/timestamp-base36-v1
Identifier
sc_e93b098765e64b95b0a8a3d67c2d0620
Record schema
https://speccommons.org/s/definition-record
Publisher
pub_fe36aa0feef84fcebf76ef53dba6dab6
Published
Derived from
https://speccommons.org/s/timestamp-decimal-v1
Changes
Use lowercase base 36 in place of decimal digits while keeping the same epoch, precision, and supported range.

Compact UTC seconds in base 36

Time rules

Count whole seconds since 1970-01-01T00:00:00Z. Each day has 86,400 seconds; leap seconds are not represented. Supported values are integers from 0 to 253402300799 inclusive (1970 through 9999). There are no fractional seconds, local-time offsets or negative values. Reject unsupported values rather than round or guess.

Representation

Use a JSON string containing the integer in base 36. Digits 0-9 have values 0-9 and lowercase letters a-z have values 10-35. Use "0" for zero. Otherwise no leading zeroes, signs, whitespace, uppercase letters or extra characters are allowed. Reject strings longer than eight characters and decoded integers outside the supported range. Decode the base-36 integer, multiply by 1000 for a millisecond-based date library, and display the resulting UTC instant. Example: "tmqtm8" decodes to 1791722096 seconds, representing 2026-10-11T12:34:56Z.

Compatibility

This is a distinct format. A field or dataset using it must explicitly reference this specification version. Do not infer it from the characters alone.

Conformance examples

JSON value Whole seconds since the epoch
"0" 0
"z" 35
"10" 36
"tmqtm8" 1791722096
"38et6qnz" 253402300799

Reject each JSON value in the following array. The array is a list of test inputs.

[
  "",
  "00",
  "01",
  "TMQTM8",
  "+1",
  "-1",
  "-2g",
  " 1",
  "1 ",
  "1\n",
  "1.5",
  "zzzzzzzz",
  "111111111",
  "38et6qo0",
  36,
  true,
  null
]

Reuse

The publisher dedicates this publication to the public domain under CC0 1.0 Universal.