[Datetime-SIG] PEP-431/495

Alexander Belopolsky alexander.belopolsky at gmail.com
Thu Aug 27 21:37:44 CEST 2015


On Thu, Aug 27, 2015 at 3:21 PM, Tim Peters <tim.peters at gmail.com> wrote:

> (1) mktime is a neither cheap nor reliable (in all cases) way to compute
> is_dst; and,
>

Moreover, there are cases where it is not even possible to tell whether DST
is in effect or not.  For example, when Moscow switched from permanent
summer time  to permanent winter time last year and Russia revised its
entire map of 7 time zones they did not tell anyone what the new value of
tm_isdst should be.

Taking my favorite example of 1990 Kiev, Ukraine.

Running on Linux:

$ zdump -v  -c 1992 Europe/Kiev| grep 1990
Europe/Kiev  Sat Jun 30 22:59:59 1990 UTC = Sun Jul  1 01:59:59 1990 MSK
isdst=0 gmtoff=10800
Europe/Kiev  Sat Jun 30 23:00:00 1990 UTC = Sun Jul  1 01:00:00 1990 EET
isdst=0 gmtoff=7200

Running on a Mac:

$ zdump -v Europe/Kiev| grep 1990
Europe/Kiev  Sat Mar 24 22:59:59 1990 UTC = Sun Mar 25 01:59:59 1990 MSK
isdst=0
Europe/Kiev  Sat Mar 24 23:00:00 1990 UTC = Sun Mar 25 03:00:00 1990 MSD
isdst=1
Europe/Kiev  Sat Jun 30 21:59:59 1990 UTC = Sun Jul  1 01:59:59 1990 MSD
isdst=1
Europe/Kiev  Sat Jun 30 22:00:00 1990 UTC = Sun Jul  1 01:00:00 1990 EEST
isdst=1

>From either of the output above, can you tell me what color was the bear?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150827/43b32a5b/attachment.html>


More information about the Datetime-SIG mailing list