summaryrefslogtreecommitdiffstats
path: root/Lib/rfc822.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/rfc822.py')
-rw-r--r--Lib/rfc822.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py
index 886098c..fcf31fb 100644
--- a/Lib/rfc822.py
+++ b/Lib/rfc822.py
@@ -329,11 +329,18 @@ _monthnames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul',
'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
def parsedate(data):
- # XXX This completely ignores timezone matters at the moment...
+ # XXX This still mostly ignores timezone matters at the moment...
data = string.split(data)
if data[0][-1] == ',':
# There's a dayname here. Skip it
del data[0]
+ if len(data) == 4:
+ s = data[3]
+ i = string.find(s, '+')
+ if i > 0:
+ data[3:] = [s[:i], s[i+1:]]
+ else:
+ data.append('') # Dummy tz
if len(data) < 5:
return None
data = data[:5]