Message24433
The parsing in emails is incomplete in both rfc822.py
and _parseaddr.py.
For example, "Wed, 02 Mar 2005 09:26:53+0800" is parsed
but "Wed, 02 Mar 2005 09:26:53-0800" is not.
The problem is clear by watching the code : only "+"
timezones are corrected.
Following a patch :
Index : _parseaddr.py
----------------------------------------------------------------
@@ -60,7 +66,11 @@ def parsedate_tz(data):
if i > 0:
data[3:] = [s[:i], s[i+1:]]
else:
- data.append('') # Dummy tz
+ i = s.find('-')
+ if i > 0:
+ data[3:] = [s[:i], s[i:]]
+ else:
+ data.append('') # Dummy tz
if len(data) < 5:
return None
data = data[:5]
---------------------------------------------------------------- |
|
Date |
User |
Action |
Args |
2007-08-23 14:29:52 | admin | link | issue1155362 messages |
2007-08-23 14:29:52 | admin | create | |
|