[Zope] Magic behavior of DateIndex in a ZCatalog

Lennart Regebro lennart@regebro.nu
Thu, 05 Jun 2003 15:20:40 +0200


Nico Grubert wrote:
> Yes, that's right, but I also tried to pass a DateTime() instance and got the following:
> 
> Python TimeStamp : DateTime.DateTime()
> DateIndex value : 1073242822 
> Metadata value : 2003/06/05 12:22:36.673 GMT+2

Yes? The internal DateIndex integer representation if a date is not the 
same as the string representation of a DateTime object either. They all 
mean exactly the same date, but the representation is not the same. Just 
as 04:00 GMT is the same as 06:00 CEST. Not the same representation, but 
they represent the same time.

> Is this DateTime index somehow useful (for searching?) in my catalog or should I throw 'em out ?

It's useful of you want to do searching on dates and times, yes.