[Python-Dev] Status on PEP-431 Timezones
alexander.belopolsky at gmail.com
Fri Jul 24 03:28:52 CEST 2015
On Thu, Jul 23, 2015 at 12:22 PM, Lennart Regebro <regebro at gmail.com> wrote:
> It turns out it's very complex to solve this when internally storing
> the time as the local time. Basically you have to normalize the time
> (ie check if daylight savings have changed) when doing arithmetic, but
> normalize is doing arithmetic, and you get infinite recursion.
This is not true. Tim's analysis immortalized  at the end of the
shows that UTC to local mapping can be unambiguously recovered from the
local to UTC rules using a simple finite algorithm. Tim assumes  that
time offset is constant throughout the history, but this requirement can be
relaxed to offset
changing no more than once in any 48 hour period (if you generously allow
from -24 to 24 hours).
Actually, it looks like I am repeating what I wrote back in April, so I'll
stop with a
reference  to that post.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev