gen

command
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL