Re: [Datetime-SIG] PEP-431/495
Tim Peters <tim.peters@gmail.com> writes:
[Akira Li <4kir4.1i@gmail.com>] ...
then arithmetic "as though via conversion to utc time" is *equally valid* as the arithmetic "as though it is a timezone-naive datetime object".aa
__add__ can only mean one of them. And it already does. It _could_ have meant the other, but it doesn't.
In fact, it does mean the other: https://mail.python.org/pipermail/datetime-sig/2015-August/000545.html stdlib is consistent with pytz (utc arithmetic). dateutil (naive) produces different results. ...
Timezones is a very complicated topic -- no solution works in the general case.a
? Timezone transitions are mathematically trivial. They're just full of lumps (irregularities).
Irregularity is another word for complexity. Timezone rules are defined by politicians. Even if they appear to be simpletons; it is still hard to create a math equation that will predict the rules. Instead, the *database* approach with regular updates works well in practice.
participants (1)
-
Akira Li