Closed nekevss closed 2 months ago
The tzdb files in jiff-tzdb are compiled using the "slim" format. Your system tzdb is probably compiled using the "fat" format to support broken applications or code that otherwise hasn't been updated to support v2 of TZif (which is extremely old itself).
The slim version doesn't include transitions that are described by the POSIX tz rule near the end of the TZif data because they are strictly redundant.
This is very likely what explains the difference.
Ah okay. I think tzif
currently only supports the version 2 blocks and not the version 1 blocks, so tzif
would need to be updated to fully support version 1 blocks to be interoperable with jiff_tzdb
.
Eh? From the tzif README:
Also includes a parser for POSIX time-zone strings, which is used by the TZif parser, but also available separately.
I'm not sure what you mean by version 1 and version 2 blocks. The slim versus fat formats are related to transitions redundant with the TZ string.
From looking at https://docs.rs/tzif/0.2.3/tzif/data/tzif/struct.TzifData.html, there isn't anything obviously missing there by my eye. So I'm not sure any updates are needed. This is almost certainly due to slim versus fat. It's an option you pass to the zic compiler: https://github.com/BurntSushi/jiff/blob/92a9dda8213dd12d3c1e6ea60dc0bae85cee6a59/jiff-cli/cmd/generate/zoneinfo.rs#L133
This is almost certainly due to slim versus fat.
Yeah, it definitely looks like it. I was initially concerned that there was something happening in data block one that couldn't be seen (obviously not the case).
Hi there! I was doing some testing with
jiff_tzdb
as a way to potentially source TZifs. I noticed during testing that currently block 2 only has atimecnt
of 175 compared to my filesystem'stimecnt
of 236 for the identifier "America/Chicago".Just to note: I am using the
tzif
crate to parse the data returned fromjiff_tzdb
.Below is a super simplified version of the code.
Am I missing something about using
jiff_tzdb
?