[tz] New IANA-timezone support date/time library

Brian Park brian at xparks.net
Tue Feb 23 21:08:04 UTC 2021


@Kerry Shetline: I think you are saying that that tubular/time parses the
TZDB files into its own format, and packages the data into the library. It
looks like you provide 3 versions of the database. As far as I can tell,
the version number is stored only as comments in `src/timezone-small.ts`,
`src/timezone-large-alt.ts`, and `src/timezone-large.ts`. Your Readme does
not mention the TZDB version number. I found the version number in the
GitHub release notes, but I wasn't able to find the release notes from the
npmjs.com site. Would consider adding an API to provide programmatic access
to the TZDB version number?

@Paul Gilmartin: With regards to how many TZDB versions I want to support,
ideally I want to be able to specify the last several versions. Within the
same OS version or Docker image, I would like at least 2 versions: One
version for the most recent TZDB release (e.g. 2021a), so that I can test
it as soon as it is released, and one version for the previous release
(e.g. 2020f). Often I want a 3rd version, for whichever version was
packaged with the JDK that comes on that particular Docker image. But
sometimes the version that comes with the `python-pytz` library is
different, so I need a 4th version. Your hint about the TZ environment
variable is interesting, and it might be useful for the `python-dateutil`
library. (I found the instructions for regenerating the
`/usr/share/zoneinfo` files here:
https://unix.stackexchange.com/questions/457862/how-can-i-install-the-tz-database-on-an-embedded-linux-platform).
I had to give up on python-dateutil, because although it comes bundled with
a specific TZDB version, it overrides that with the OS tz files if they
exist, so I could not get reproducible test results on different Docker
images.

@Jon Skeet: Thanks for confirming that Noda Time has support for selecting
the TZDB version. I was aware of your library, and was impressed with its
documentation, but I don't know .NET or C# so I didn't want to invest the
time without knowing whether it had support for this feature. But now that
I do, maybe I'll learn enough C# to validate against your library. With
regards to java.time, I knew about ZoneRulesProvider, but I could never
find sufficient documentation about how to actually generate my own tz
database for java.time.

@David Braverman: Thanks for the pointer to InnerDrive.TimeZones. I'm not
familiar with the .NET ecosystem, so I can't quite figure out what the
InnerDrive framework does. But I will keep it in mind.

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20210223/0f101182/attachment.htm>


More information about the tz mailing list