[Zope] Magic behavior of DateIndex in a ZCatalog

Lennart Regebro lennart@regebro.nu
Thu, 05 Jun 2003 14:03:12 +0200

Nico Grubert wrote:
> - Why does the DateIndex value differs so much from the metadata value ?

Because you indexed something else that a DateTime object. The index 
will then try to convert it to a DateTime object, and in some caseas 
above this succeeded, and in some cases it didn't. The internal 
DateIndex integer represenations is not the same as time.time().

> - Which TimeStamp should I use when I create a content object ?

All of them that actually created an index should work equally fine, 
unless there is a bug in the conversion somewhere. DateTime() is the 
usualy one in Zope, unless you have good reasons not to use it.