[Python-checkins] CVS: python/nondist/sandbox/datetime datetime.py,1.31,1.32
Tim Peters
tim_one@users.sourceforge.net
Sun, 03 Mar 2002 17:39:55 -0800
Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory usw-pr-cvs1:/tmp/cvs-serv1894
Modified Files:
datetime.py
Log Message:
Removed datetime._timestamp(): it called datetime._mktime(), then added
in microseconds. But datetime._mktime() already adds in microseconds,
so _timestamp() was just a buggy synonyn.
Index: datetime.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/datetime.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** datetime.py 4 Mar 2002 01:03:14 -0000 1.31
--- datetime.py 4 Mar 2002 01:39:53 -0000 1.32
***************
*** 551,558 ****
return t.time() + self.__microsecond / 1e6
- def _timestamp(self):
- # Helper like _mktime() that adds microseconds
- return self._mktime() + self.__microsecond / 1e6
-
def timetuple(self):
"Return local time tuple compatible with time.localtime()."
--- 551,554 ----
***************
*** 584,588 ****
(y2, m2, d2, hh2, mm2, ss2, tz2))
else:
! return cmp(self._timestamp(), other._timestamp())
else:
raise TypeError, ("can't compare datetime to %s instance" %
--- 580,584 ----
(y2, m2, d2, hh2, mm2, ss2, tz2))
else:
! return cmp(self._mktime(), other._mktime())
else:
raise TypeError, ("can't compare datetime to %s instance" %