[Python-checkins] CVS: python/dist/src/Lib rfc822.py,1.44,1.45
Guido van Rossum
guido@cnri.reston.va.us
Mon, 17 Jan 2000 09:11:06 -0500 (EST)
Update of /projects/cvsroot/python/dist/src/Lib
In directory eric:/projects/python/develop/guido/src/Lib
Modified Files:
rfc822.py
Log Message:
Fix by Nick Russo in processing of timezone in test program; the
ParsedDate didn't have the correct day of week.
Index: rfc822.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/rfc822.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -r1.44 -r1.45
*** rfc822.py 1999/10/06 15:19:19 1.44
--- rfc822.py 2000/01/17 14:11:04 1.45
***************
*** 928,934 ****
print 'Date:', m.getheader('date')
date = m.getdate_tz('date')
if date:
! print 'ParsedDate:', time.asctime(date[:-1]),
! hhmmss = date[-1]
hhmm, ss = divmod(hhmmss, 60)
hh, mm = divmod(hhmm, 60)
--- 928,936 ----
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),
! hhmmss = tz
hhmm, ss = divmod(hhmmss, 60)
hh, mm = divmod(hhmm, 60)