[Patches] [ python-Patches-748843 ] Let Email.Utils.parsedate use last 3 timetuple items

SourceForge.net noreply at sourceforge.net
Thu Mar 3 15:46:05 CET 2005


Patches item #748843, was opened at 2003-06-04 15:22
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=748843&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Gerrit Holl (gerrit)
Assigned to: Nobody/Anonymous (nobody)
Summary: Let Email.Utils.parsedate use last 3 timetuple items

Initial Comment:
Hi,

this patch changes the behaviour of
Email.Utils.parsedate. Currently, the last 3 tuple
items are unused. One place where this complicates
things unnecessarily is when trying to find out the
week number: currently, it is necessary to convert the
tuple back and forth to a timestamp by hand, in order
to retrieve the information in the last 3 items. This
patch fixes this, and makes the default behaviour to
use all timetuple fields.

It also changes the corresponding documentation.

I also sent this to patches at python.org when SF was down.

Gerrit.

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

Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-03-03 15:46

Message:
Logged In: YES 
user_id=1188172

The patch returns time.localtime(time.mktime(t[:9])) instead
of t[:9]

This does affect speed if you don't need the last 3 fields,
and you always can call localtime(mktime(...)) in your code
if you need them.

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

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


More information about the Patches mailing list