[Python-Dev] Status on PEP-431 Timezones
p.f.moore at gmail.com
Mon Jul 27 17:12:20 CEST 2015
On 27 July 2015 at 15:37, Lennart Regebro <regebro at gmail.com> wrote:
> That you add one hour to it, and the datetime moves forward one hour
> in actual time? That's doable, but during certain circumstance this
> may mean that you go from 1AM to 1AM, or from 1AM to 3AM.
> Or do you expect that adding one hour will increase the hour count
> with one, ie that the "wall time" increases with one hour? This may
> actually leave you with a datetime that does not exist, so that is not
> something you can consistently do.
OK, that pretty much validates what I thought might be the case at the
end of my recent lengthy email. What you're saying is that the idea of
a timedelta is insufficiently rich here - just saying "1 hour" doesn't
give you enough information to know which of the two expectations the
user has. (The fact that one of those expectations isn't viable is not
actually relevant here).
OK, I see what your point is now. No idea how to solve it, but at
least I understand what you're getting at (I think). Thanks for not
giving up on the thread!
Does thinking of the problem in terms of timedeltas not containing
enough information to make a_time + a_timedelta a well-defined
operation if a_time uses a non-fixed-offset timezone, make it any
easier to find a way forward?
More information about the Python-Dev