[Python-checkins] python/nondist/sandbox/datetime datetime.py,1.115,1.116

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
2002年12月21日 09:21:04 -0800


Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory sc8-pr-cvs1:/tmp/cvs-serv6093
Modified Files:
	datetime.py 
Log Message:
Caught another place where utcoffset() result wasn't checked for sanity.
Index: datetime.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/datetime.py,v
retrieving revision 1.115
retrieving revision 1.116
diff -C2 -d -r1.115 -r1.116
*** datetime.py	21 Dec 2002 17:11:31 -0000	1.115
--- datetime.py	21 Dec 2002 17:21:01 -0000	1.116
***************
*** 1003,1011 ****
 if mytz is ottz:
 return supercmp(other)
! myoff = otoff = None
! if mytz is not None:
! myoff = mytz.utcoffset(self)
! if ottz is not None:
! otoff = ottz.utcoffset(other)
 if myoff == otoff:
 return supercmp(other)
--- 1003,1008 ----
 if mytz is ottz:
 return supercmp(other)
! myoff = self.utcoffset()
! otoff = other.utcoffset()
 if myoff == otoff:
 return supercmp(other)

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