[Datetime-SIG] Are there any "correct" implementations of tzinfo?

Laura Creighton lac at openend.se
Mon Sep 14 12:59:27 EDT 2015


In a message of Mon, 14 Sep 2015 09:30:43 -0400, Random832 writes:
>On Mon, Sep 14, 2015, at 04:27, Laura Creighton wrote:
>> I find this totally unacceptable.  My conclusion was that hybrid tzinfo
>> objects were a _really stupid idea_ proposed by somebody who
>> misunderstood
>> the problem, or rather only understood the most common case.
>
>"Hybrid tzinfo objects" _in isolation_ are not bad. The problem isn't
>the objects themselves, it's the whole design:
>
>1. Hybrid tzinfo objects
>2. Attached tzinfo object as the _only_ way to identify the timezone of
>a datetime (no offset member)
>3. Datetime itself stored in local time.

Ah, thank you for explaining.  I thought the only reason you would
want a hybrid tzinfo number is that you absolutely did not want
an offset number.  Which is the part I found, ah, nutty.

I see now that it doesn't have to be this way.

Laura




More information about the Python-list mailing list