[ python-Bugs-1053539 ] time module returns wrong timezone under windows

SourceForge.net noreply at sourceforge.net
Mon Oct 25 08:41:18 CEST 2004


Bugs item #1053539, was opened at 2004-10-25 06:41
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1053539&group_id=5470

Category: Python Library
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: panjunyong (panjunyong)
Assigned to: Nobody/Anonymous (nobody)
Summary: time module returns wrong timezone under windows

Initial Comment:
I have tested windows xp/2000 Chinese version with
python 2.3.3 and python 2.4b1.  

My timezone in windows is GMT+8. But:

>>> import time
>>> time.timezone
-28800 

-28800 means GMT-8, but not GMT+8. This cause
time.time() time.gmtime() return wrong values(16 hours
late).

I have no such problem under linux.

BTW, I found the issue:

https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1039270&group_id=5470


So I think maybe this problem is sensitive with my
Chinese platform too:

>>> time.tzname
('\xd6\xd0\xb9\xfa\xb1\xea\xd7\xbc\xca\xb1\xbc\xe4',
'\xd6\xd0\xb9\xfa\xb1\xea\x
d7\xbc\xca\xb1\xbc\xe4')


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1053539&group_id=5470


More information about the Python-bugs-list mailing list