On Thu, Aug 27, 2015 at 3:21 PM, Tim Peters <[email protected]> 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?
_______________________________________________
Datetime-SIG mailing list
[email protected]
https://mail.python.org/mailman/listinfo/datetime-sig
The PSF Code of Conduct applies to this mailing list: 
https://www.python.org/psf/codeofconduct/

Reply via email to