[Datetime-SIG] IANA TZ database statistics

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Sep 23 23:00:32 CEST 2015


I added a method to datetimetester [1] to compute some overall statistics
on tzfiles.  My code ignores "version 2" data, so I include only
transitions that fall within 32-bit time_t (1900 to 2038 range).

Here are the results for the default Mac OSX system files and the most
recent Github version of tz [2]:

>>> from datetimetester import *
>>> ZoneInfo.stats()
Number of zones:         584
Number of transitions: 38510 = 19058 (gaps) + 19008 (folds) + 444 (zeros)
Min gap:                  0:00:16 at 1935-01-01 03:40:52 in
America/Paramaribo
Max gap:           1 day, 0:00:00 at 2011-12-30 10:00:00 in Pacific/Apia
Min fold:                 0:01:31 at 1932-01-01 03:58:29 in America/Barbados
Max fold:                10:00:00 at 1952-01-13 14:00:00 in
Antarctica/DumontDUrville
>>> ZoneInfo.zoneroot = '/usr/local/etc/zoneinfo'
>>> ZoneInfo.stats()
Number of zones:         585
Number of transitions: 39018 = 19434 (gaps) + 19131 (folds) + 453 (zeros)
Min gap:                  0:00:04 at 1914-01-01 04:00:04 in America/Manaus
Max gap:           1 day, 0:00:00 at 2011-12-30 11:00:00 in Pacific/Fakaofo
Min fold:                 0:00:10 at 1906-06-30 16:53:20 in Asia/Ho_Chi_Minh
Max fold:                23:00:00 at 1969-09-30 13:00:00 in Kwajalein

[1]:
https://github.com/abalkin/cpython/commit/fa4f8055ac6723d4d0940ea141e05f931c718a2c
[2]: https://github.com/eggert/tz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150923/06cc756a/attachment.html>


More information about the Datetime-SIG mailing list