[Zodb-checkins] CVS: Zope3/lib/python/ZODB - TimeStamp.c:1.8.4.4

Jim Fulton jim@zope.com
Sun, 6 Jan 2002 16:07:38 -0500


Update of /cvs-repository/Zope3/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv6061

Modified Files:
      Tag: Zope-3x-branch
	TimeStamp.c 
Log Message:
Disabled a superfluous and incorrect check for valid seconds value in
TimeStamp constructor that cause tests and startup to fail
sporadically.


=== Zope3/lib/python/ZODB/TimeStamp.c 1.8.4.3 => 1.8.4.4 ===
     CHECK_RANGE(hour, 0, 23);
     CHECK_RANGE(min, 0, 59);
+    /* Seconds are allowed to be anything, so chill
+       If we did want to be pickly, 60 would be a better choice.
     if (sec < 0 || sec > 59)
 	return PyErr_Format(PyExc_ValueError,
 			    "second must be between 0 and 59: %f", sec);
-
+    */
     ts = (TimeStamp *)PyObject_New(TimeStamp, &TimeStamp_type);
     v = (((year - 1900) * 12 + month - 1) * 31 + day - 1);
     v = (v * 24 + hour) * 60 + min;