Time.Tzif

lib/Time/Tzif.gob

Time zone files, as the system keeps them under /usr/share/zoneinfo: the TZif format, version 2 or later.

Only what an offset needs is kept: the transition times, the offset after each, the offset before the first, and the POSIX rule in the footer that takes over after the last. The 32-bit block of the file is skipped, and so are abbreviations, leap-second records and the standard/wall indicators, since ISO text never uses them. A version 1 file, which has no 64-bit block and no footer, is not read.

type Table
fun parse : fun(Array Byte) -> Option Table
fun offsetAt : fun(Table, UnixSeconds) -> Offset

The offset in force at t. Before the first transition it is the first time type's; after the last, the footer's rule's if there is one. With no transitions at all, the footer's rule holds throughout.

fun transitions : fun(Table, UnixSeconds, UnixSeconds) -> Array Transition

The transitions from from to to, both included, in order, the footer's rule's among them.