TZJData provides releases of the IANA tzdata compiled into the tzjfile (time zone julia file) format. The compiled data stored via package artifacts and used by the TimeZones.jl as an the source of pre-computed time zones.
The TZJData package uses semantic versioning like any other Julia package. Unlike most Julia packages however the TZJData package also uses build metadata to indicate the associated IANA tzdata release (e.g. TZJData release 1.0.0+2023c
uses tzdata 2023c). Each TZJData release is only associated with a single IANA tzdata release but multiple TZJData releases may correspond to the same IANA tzdata release (i.e. 1.0.0+2023c
and 1.0.1+2023c
both use tzdata 2023c).
In addition to the standard semantic versioning rules used by Julia packages the TZJData package also adheres to the following internal rules:
2023c
)The compiled tzjfile data is stored as a series of flat files in the same way zoneinfo is on Linux distributions. Users can read this data via the TimeZones.jl package:
julia> using TZJData
julia> using TimeZones: TZJFile
julia> function load(tzname)
rel_path = joinpath(split(tzname, '/'))
return open(TZJFile.read, joinpath(TZJData.ARTIFACT_DIR, rel_path), "r")(tzname)
end
load (generic function with 1 method)
julia> load("Europe/Warsaw")
(tz"Europe/Warsaw", TimeZones.Class(:STANDARD))