[Python-Dev] Status on PEP-431 Timezones

Stuart Bishop stuart at stuartbishop.net
Wed Apr 15 23:28:08 CEST 2015


On 15 April 2015 at 21:51, Lennart Regebro <regebro at gmail.com> wrote:
> On Wed, Apr 15, 2015 at 3:23 PM, Stuart Bishop <stuart at stuartbishop.net> wrote:

> Just punting it to tzinfo to make adjustments, ie effectively just
> doing what normalize() does creates infinite recursion as there is
> more arithmetic in there, so it's not quite that simple.

This sounds familiar. Its infinite recursion if the tzinfo does its
calculations using localized datetimes. If the tzinfo is stripped for
the calculations, there is no tzinfo to recurse into. At least this
was how I hoped it would work, and it sucks if it doesn't. You could
be right that using the UTC representation internally for datetimes
with a tzinfo makes the most sense.

-- 
Stuart Bishop <stuart at stuartbishop.net>
http://www.stuartbishop.net/


More information about the Python-Dev mailing list