[Python-Dev] Status on PEP-431 Timezones

Lennart Regebro regebro at gmail.com
Tue Jul 28 07:03:59 CEST 2015


On Tue, Jul 28, 2015 at 12:03 AM, Tim Peters <tim.peters at gmail.com> wrote:
> timedelta objects only store days, seconds, and microseconds,

Except that they don't actually store days. They store 24 hour
periods, which, because of timezones changing, is not the same thing.
This is also clearly intended, for example timedelta allows floats,
and will convert the fraction into seconds. And as you have repeated
many times now, the datetime module's arithmetic is "naive" ie, it
assumes that one day is always 24 hours. The problem with that
assumption is that it isn't true.


More information about the Python-Dev mailing list