Mark Lawrence added the comment:
Could one of our timezone gurus respond to this please.
--
components: +Library (Lib)
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.4, Python 3.5
___
Python tracker rep...@bugs.python.org
Alexander Belopolsky added the comment:
I think this is out-of-date. On Mac OS X, I get
```
$ python3 -V
Python 3.4.1
$ TZ=Europe/Moscow python3 -c import time; print(time.daylight)
0
```
I'll check on Linux now ...
--
___
Python tracker
Alexander Belopolsky added the comment:
Same result on a freshly compiled
Python 3.4.1 (default, Jun 29 2014, 15:26:46)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux
$ TZ=Europe/Moscow ~/Apps/bin/python3 -c import time; print(time.daylight)
0
I suspect that the problem was with OP's system
Alexander Belopolsky added the comment:
But python detect daylight flag as differences between January and July
localtime.
This is the best we can do because time.daylight is a constant and this does
not work in locations like Moscow where daylight rules were adopted ~ 30 years
ago and
Alexander Belopolsky added the comment:
I suspect there will be another period soon when time.daylight logic will break
after Europe/Moscow goes back to winter time (hopefully for good).
There is no solution of this issue within constraints of the time module. See
issue9527 for how it was
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13413
___
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +belopolsky, lemburg
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13413
___
___
New submission from Dmitry Balabanov dim...@gmail.com:
In Europe/Moscow timezone:
import time
time.daylight
1
time.timezone
-10800
But if compile and run attached program result would be:
timezone: -14400, daylight: 0
Daylight is not applicable in Europe/Moscow timezone from this winter.