Skip to content

Format reference

Each format below counts from a particular epoch in a particular unit, with particular timezone and leap-second semantics, and a representable range fixed by its width and signedness. The detail pages give the byte layout, the historical evolution, a worked example, and the forensic gotchas, each tied to a primary source.

Master table

Format Epoch Unit Width TZ Family
Unix 1970-01-01 seconds 32/64-bit UTC Unix/web/DB
Unix ms 1970-01-01 milliseconds 64-bit UTC Unix/web/DB
Unix µs / ns 1970-01-01 µs / ns 64-bit UTC Unix/web/DB
FILETIME 1601-01-01 100 ns 64-bit UTC Windows
WebKit/Chrome 1601-01-01 microseconds 64-bit UTC Unix/web/DB
.NET ticks 0001-01-01 100 ns 64-bit varies Windows
OLE Automation 1899-12-30 days (float) f64 local/UTC Windows
FAT/DOS 1980-01-01 packed (2 s) 32-bit local Windows
Cocoa / CFAbsoluteTime 2001-01-01 seconds f64 (signed) UTC Apple
HFS+ 1904-01-01 seconds u32 UTC* Apple
APFS 1970-01-01 nanoseconds u64 UTC Apple
PostgreSQL 2000-01-01 microseconds int64 UTC Unix/web/DB
SQLite Julian −4713-11-24 noon days (float) f64 UTC Unix/web/DB
Snowflake / Discord 2010 / 2015 ms (shifted) 64-bit UTC Identifiers
UUIDv1 / v6 1582-10-15 100 ns 60-bit UTC Identifiers
UUIDv7 / ULID 1970-01-01 milliseconds 48-bit UTC Identifiers
GPS / TAI64 / NTP varies s / s / s leap-aware leap module

* HFS+ stores UTC, but classic HFS stored local time, and the HFS+ volume-header creation date is an explicit local-time exception — see Apple.

Detail pages

  • Microsoft / Windows — FILETIME, OLE Automation (and the Excel 1900 leap-year bug), .NET ticks, SYSTEMTIME, Active Directory / LDAP, FAT/DOS, exFAT, the NTFS $STANDARD_INFORMATION vs $FILE_NAME timestomping distinction, and ZIP.
  • Apple / macOS / iOS — HFS+ (and the classic-HFS local-time caveat), Cocoa / CFAbsoluteTime, APFS, Core Data, and the Safari-vs-Chrome "WebKit" trap.
  • Unix, web & databases — Unix s/ms/µs/ns, the Year 2038 problem, WebKit/Chrome, PostgreSQL, SQLite's three encodings, MySQL, Java/JS, and PRTime.
  • Identifiers — Snowflake (Twitter/X, Discord), UUID v1/v6/v7, ULID, MongoDB ObjectId, KSUID, Sonyflake.

Leap-aware family

GPS, TAI64, and NTP are not routed through the POSIX spine — they need true leap arithmetic or era handling. In timeglyph they live behind the leap feature and are decoded via hifitime (GPS/TAI) or additive jiff (NTP):

$ cargo build --features leap
$ timeglyph decode gps 1261872018      # → 2020-01-01T00:00:00Z (leap-correct UTC)
$ timeglyph decode tai64 4611686020005224741
$ timeglyph decode ntp 3786825600

See time scales for the GPS−UTC = 18 s and TAI−UTC = 37 s offsets these apply.