[Python-Dev] Status on PEP-431 Timezones

Lennart Regebro regebro at gmail.com
Wed Apr 8 23:38:44 CEST 2015


On Wed, Apr 8, 2015 at 7:37 PM, Carl Meyer <carl at oddbird.net> wrote:
> Hi Lennart,
>
> On 04/08/2015 09:18 AM, Lennart Regebro wrote:
>> I wrote PEP-431 two years ago, and never got around to implement it.
>> This year I got some renewed motivation after Berker Peksağ made an
>> effort of implementing it.
>> I'm planning to work more on this during the PyCon sprints, and also
>> have a BoF session or similar during the conference.
>>
>> Anyone interested in a session on this, mail me and we'll set up a
>> time and place!
>
> I'm interested in the topic, and would probably attend a BoF at PyCon.

Cool!

> So is adopting pytz's expanded API into the stdlib really a big problem?

Maybe, maybe not. But that API is also needlessly complicated,
precisely because it's working around the limitations of
datetime.tzinfo. In the PEP I remove those limitations but keep the
simpler API. With a solution based on how pytz does it, I don't think
that's possible.

> Is this really adequate? pytz's implementation handles far more than "is
> DST or not", it also correctly handles historical timezone changes. How
> would those be handled under this proposal?

Those would still be handled. The flag is only to flag if it's DST or
not in a timestamp that is otherwise ambiguous.

//Lennart


More information about the Python-Dev mailing list