[Python-checkins] r43597 - python/branches/release24-maint/Lib/email/_parseaddr.py

anthony.baxter python-checkins at python.org
Mon Apr 3 18:40:28 CEST 2006


Author: anthony.baxter
Date: Mon Apr  3 18:40:28 2006
New Revision: 43597

Modified:
   python/branches/release24-maint/Lib/email/_parseaddr.py
Log:
backport of r43578 
The email module's parsedate_tz function now sets the daylight savings
flag to -1 (unknown) since it can't tell from the date whether it should
be set.
patch from Aldo Cortesi


Modified: python/branches/release24-maint/Lib/email/_parseaddr.py
==============================================================================
--- python/branches/release24-maint/Lib/email/_parseaddr.py	(original)
+++ python/branches/release24-maint/Lib/email/_parseaddr.py	Mon Apr  3 18:40:28 2006
@@ -117,7 +117,8 @@
         else:
             tzsign = 1
         tzoffset = tzsign * ( (tzoffset//100)*3600 + (tzoffset % 100)*60)
-    return yy, mm, dd, thh, tmm, tss, 0, 1, 0, tzoffset
+    # Daylight Saving Time flag is set to -1, since DST is unknown.
+    return yy, mm, dd, thh, tmm, tss, 0, 1, -1, tzoffset
 
 
 def parsedate(data):


More information about the Python-checkins mailing list