[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope-cvs
Subject:    [Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/DateIndex - DateIndex.py:1.5
From:       Chris McDonough <chrism () zope ! com>
Date:       2002-06-30 5:45:37
[Download RAW message or body]

Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/DateIndex
In directory cvs.zope.org:/tmp/cvs-serv788

Modified Files:
	DateIndex.py 
Log Message:
DateIndexes were handling neither float nor int dates as values to
_apply_index or index_object.

Fixed and added test cases to unittests.


=== Zope/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py 1.4 => 1.5 ===
 from BTrees.OIBTree import OIBTree
 from BTrees.IIBTree import IISet, union, intersection, multiunion
+import time
 
 _marker = []
 
@@ -169,7 +170,7 @@
         """Convert Date/Time value to our internal representation"""
         if isinstance( value, DateTime ):
             t_tup = value.parts()
-        elif type( value ) is FloatType:
+        elif type( value ) in (FloatType, IntType):
             t_tup = time.gmtime( value )
         elif type( value ) is StringType:
             t_obj = DateTime( value )



_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://lists.zope.org/mailman/listinfo/zope-checkins
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic