[Datetime-SIG] Timezone database

Łukasz Rekucki lrekucki at gmail.com
Wed Jul 29 18:45:03 CEST 2015


On 29 July 2015 at 18:36, Guido van Rossum <guido at python.org> wrote:
> On Wed, Jul 29, 2015 at 6:31 PM, Felipe Ochoa
> <felipe.nospam.ochoa at gmail.com> wrote:
>>
>> [Branching from The BDFL's take]
>>
>>> There are a few additional issues which I'm not sure are included in this
>>> discussion or not:
>>> - A unified API for accessing an up-to-date timezone database. This has
>>> been discussed in the past, and we couldn't find a solution that satisfied
>>> all requirements (the main problem being different platform expectations
>>> IIRC), but it's probably worth it trying again.
>>
>>
>> The current solution proposed in the PEP is to have platforms with
>> /usr/share/zoneinfo use that as long as they want. For other platforms
>> Python would ship with a built-in copy (roughly speaking) of the database.
>> There would then be separate tzdata-update package on pypi that can be `pip
>> install`ed to update the timezone database whenever the user feels the need
>> to do so (because /usr/share/zoneinfo is no longer receiving updates or
>> because it doesn't exist)
>>
>> What are the unsatisfied requirements of this design?
>
>
> It looks like Windows (where a lot of Python users actually are -- just not
> those who are most active in Open Source) is left out in the cold here. I'm
> sure Windows by now has a timezone info database of its own that is kept
> up-to-date whenever you install Microsoft updates, and Python should use
> that in preference over a Python-specific database which is only updated
> when the user updates Python (which may be never).

The problem with Windows is that is has its own naming of timezones.
There are mapping between the two[1], but then you need to make sure
the mapping is up-to-date (which I think doesn't change very often).


[1]: http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/zone_tzid.html


-- 
Łukasz Rekucki


More information about the Datetime-SIG mailing list