projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
947a0fa
)
Fix by Nick Russo in processing of timezone in test program; the
author
Guido van Rossum
<guido@python.org>
Mon, 17 Jan 2000 14:11:04 +0000
(14:11 +0000)
committer
Guido van Rossum
<guido@python.org>
Mon, 17 Jan 2000 14:11:04 +0000
(14:11 +0000)
ParsedDate didn't have the correct day of week.
Lib/rfc822.py
patch
|
blob
|
history
diff --git
a/Lib/rfc822.py
b/Lib/rfc822.py
index a147155900e1cc6689e6aab9ab97220f72acd7f6..b937038ab3d4b07cd57b6abd33248f4b246e4615 100644
(file)
--- a/
Lib/rfc822.py
+++ b/
Lib/rfc822.py
@@
-927,9
+927,11
@@
if __name__ == '__main__':
print 'Subject:', m.getheader('subject')
print 'Date:', m.getheader('date')
date = m.getdate_tz('date')
+ tz = date[-1]
+ date = time.localtime(mktime_tz(date))
if date:
- print 'ParsedDate:', time.asctime(date
[:-1]
),
- hhmmss =
date[-1]
+ print 'ParsedDate:', time.asctime(date),
+ hhmmss =
tz
hhmm, ss = divmod(hhmmss, 60)
hh, mm = divmod(hhmm, 60)
print "%+03d%02d" % (hh, mm),