summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/email/_parseaddr.py3
-rw-r--r--Lib/email/test/test_email.py4
-rw-r--r--Lib/email/test/test_email_renamed.py4
3 files changed, 6 insertions, 5 deletions
diff --git a/Lib/email/_parseaddr.py b/Lib/email/_parseaddr.py
index 109ff5f..5821ddf 100644
--- a/Lib/email/_parseaddr.py
+++ b/Lib/email/_parseaddr.py
@@ -124,7 +124,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):
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index d35e770..d977693 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -2113,12 +2113,12 @@ class TestMiscellaneous(TestEmailBase):
def test_parsedate_no_dayofweek(self):
eq = self.assertEqual
eq(Utils.parsedate_tz('25 Feb 2003 13:47:26 -0800'),
- (2003, 2, 25, 13, 47, 26, 0, 1, 0, -28800))
+ (2003, 2, 25, 13, 47, 26, 0, 1, -1, -28800))
def test_parsedate_compact_no_dayofweek(self):
eq = self.assertEqual
eq(Utils.parsedate_tz('5 Feb 2003 13:47:26 -0800'),
- (2003, 2, 5, 13, 47, 26, 0, 1, 0, -28800))
+ (2003, 2, 5, 13, 47, 26, 0, 1, -1, -28800))
def test_parsedate_acceptable_to_time_functions(self):
eq = self.assertEqual
diff --git a/Lib/email/test/test_email_renamed.py b/Lib/email/test/test_email_renamed.py
index ed186a0..4ac2ee9 100644
--- a/Lib/email/test/test_email_renamed.py
+++ b/Lib/email/test/test_email_renamed.py
@@ -2119,12 +2119,12 @@ class TestMiscellaneous(TestEmailBase):
def test_parsedate_no_dayofweek(self):
eq = self.assertEqual
eq(utils.parsedate_tz('25 Feb 2003 13:47:26 -0800'),
- (2003, 2, 25, 13, 47, 26, 0, 1, 0, -28800))
+ (2003, 2, 25, 13, 47, 26, 0, 1, -1, -28800))
def test_parsedate_compact_no_dayofweek(self):
eq = self.assertEqual
eq(utils.parsedate_tz('5 Feb 2003 13:47:26 -0800'),
- (2003, 2, 5, 13, 47, 26, 0, 1, 0, -28800))
+ (2003, 2, 5, 13, 47, 26, 0, 1, -1, -28800))
def test_parsedate_acceptable_to_time_functions(self):
eq = self.assertEqual