This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Phyo.Arkar.Lwin
Recipients Phyo.Arkar.Lwin
Date 2010-12-11.11:44:28
SpamBayes Score 0.0010893234
Marked as misclassified No
Message-id <1292067870.01.0.821446492471.issue10678@psf.upfronthosting.co.za>
In-reply-to
Content
DESCRIPTION:

I am trying to parse Time Zone information out of email messages and i found out that mktime_tz is totally ignoring TimeZone information from parsedate_tz.


VERSION: 2.6.5
CODE and RESULTS:


from time import mktime
from email.utils import parsedate,parsedate_tz,formatdate,mktime_tz

parsedate_tz('Sat, 10 Apr 2004 03:50:19 +400')
>>> (2004, 4, 10, 3, 50, 19, 0, 1, -1, 14400)


mktime_tz(parsedate_tz('Sat, 10 Apr 2004 03:50:19 +400'))
>>>1081554619.0
mktime(parsedate('Sat, 10 Apr 2004 03:50:19'))
>>>1081545619.0

Same????

formatdate(mktime_tz(parsedate_tz('Sat, 10 Apr 2004 03:50:19 +400')))
>>>'Fri, 09 Apr 2004 23:50:19 -0000' # WRONG TOTALLY

Expected Result:
>>>'Sat, 10 Apr 2004 03:50:19 +400'
History
Date User Action Args
2010-12-11 11:44:30Phyo.Arkar.Lwinsetrecipients: + Phyo.Arkar.Lwin
2010-12-11 11:44:30Phyo.Arkar.Lwinsetmessageid: <1292067870.01.0.821446492471.issue10678@psf.upfronthosting.co.za>
2010-12-11 11:44:28Phyo.Arkar.Lwinlinkissue10678 messages
2010-12-11 11:44:28Phyo.Arkar.Lwincreate