[Python-checkins] CVS: python/dist/src/Lib rfc822.py,1.44,1.45

Guido van Rossum guido@cnri.reston.va.us
2000年1月17日 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)

AltStyle によって変換されたページ (->オリジナル) /