struct TZFileFormat { char8[4] magic = "TZif"; char8 version = '2'; byte[15] reserved; int32 ttIsGmtCount; int32 ttIsStdCount; int32 leapCount; int32 timeCount; int32 typeCount; int32 charCount; int32[timeCount] transitionTimes; // UNIX timestamp* of each transition time (that's when the rule changes) byte[timeCount] ttLocalTimeTypes; // specify 'local time type' (see timeTypes) for the same-indexed transitionTimes item ttInfo[typeCount] timeTypes; // purpose unclear ??? // array of time zone abbreviation characters (undefined) leapData[leapCount] leapSeconds; // sorted by .time byte[ttIsStdCount]; // standard/wall indicators for transition times associated with local time types - unused? byte[ttIsGmtCount]; // UTC/local indicators for transition times associated with local time types - unused? // now comes version-2-specific data (see tzfile(5), last paragraph) // which is the entire file once again, only with int64 types for all transition times and leap seconds times // followed by char8[] = /\n[^\n]*\n/ (purpose unclear) } struct ttInfo { int32 gmtOffset; // offset to UTC in seconds byte isDst; // indicates whether this is DST byte abbrIndex; // index into "array of time zone abbreviation characters" (undefined) } struct leapData { int32 time; // UNIX timestamp* of the time when a leap second occurs int32 total; // total number of leap seconds to be applied after that time } // *) UNIX timestamp: seconds since 1970-01-01T00:00:00Z