]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport of r43578
authorAnthony Baxter <anthonybaxter@gmail.com>
Mon, 3 Apr 2006 16:40:28 +0000 (16:40 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Mon, 3 Apr 2006 16:40:28 +0000 (16:40 +0000)
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

Lib/email/_parseaddr.py

index 7d759efbcff54ca438f3cf4ba7a9cebb1a51fcb1..8e6cb60bd58a7dd3781f22f535df7fe1ea94751e 100644 (file)
@@ -117,7 +117,8 @@ def parsedate_tz(data):
         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):