Documentation
¶
Overview ¶
Command gen writes zones_gen.go, the zone table of package temporal, from three published files: tzdata.zi, the compact form of the IANA time zone database that systems ship under zoneinfo (its Z lines are the zones and its L lines the links to them), which gives every name; CLDR's bcp47/timezone.xml, whose alias groups say which names are one zone, as Temporal's implementations canonicalize, so that Asia/Calcutta equals Asia/Kolkata while Europe/Stockholm stays apart from Europe/Berlin although the IANA database has merged their rules since 1970; and CLDR's windowsZones.xml, which maps Windows zone names to IANA names. Go's time package has no list of zone names and no alias table, so the table is what makes a lookup case-insensitive on every platform, aliases equal, and a Windows machine's local zone known.
go run ./internal/temporal/gen -tzdata /usr/share/zoneinfo/tzdata.zi -cldr timezone.xml -windows windowsZones.xml