time.timezone gives strange results on cygwin
Andy Todd
andy_todd at spam.free.yahoo.com
Sun Sep 23 23:16:27 EDT 2001
time.timezone is returning an incorrect value on cygwin python.
Whilst running some code on different platforms I have identified what I
believe to be a bug in the timezone function of the time module on cygwin.
This works as expected from Windows (Python 2.1.1 on Win2k, Win98, WinNT4)
but on the same machines via cygwin comes up with an incorrect figure.
>From the documentation;
"""
timezone
The offset of the local (non-DST) timezone, in seconds west of UTC
(i.e. negative in most of Western Europe, positive in the US, zero in
the UK).
"""
The timezone set on all of my machines is AEST - Australian Eastern
Standard Time which is 10 hours ahead of UTC.
>From windows;
>>> import time
>>> print time.tzname
('AUS Eastern Standard Time', 'AUS Eastern Daylight Time')
>>> print time.timezone
-36000
But from cygwin on the same machine;
$ python
Python 2.1.1 (#2, Aug 23 2001, 10:41:44)
[GCC 2.95.3-5 (cygwin special)] on cygwin
Type "copyright", "credits" or "license" for more information.
>>> import time
>>> print time.tzname
('AUSEST', 'AUSEDT')
>>> print time.timezone
1834228892
>>>
Any suggestions? I'm presuming that the underlying system function that is
called to calculate the timezone offset is wrong under cygwin.
Regards,
Andy
--
Content free posts a speciality
More information about the Python-list
mailing list