[Zope] Magic behavior of DateIndex in a ZCatalog

Nico Grubert nicogrubert@web.de
Thu, 5 Jun 2003 15:41:45 +0200

> > 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.

Does that mean, that "1073242822" has nothing to do with the float representation of time.time() ? 

Does that mean, that "1073242822" is the same date + time as "2003/06/05 12:22:36.673 GMT+2" - it only has a different representation ? 

How can I convert the value "1073242822" to a "YYYY/MM/DD" value ?
I tried:
>>> time.ctime(1073242822)
'Sun Jan 04 20:00:22 2004'

but this does not seem to be right in comparison to the metadata value (2003/06/05 12:22:36.673 GMT+2)...

> > 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.

Ah okay. Then, my next question is: how can I search for objects created on 2003/06/04 if I have to check agains values like "1073242822". Does the ZCatalog automatically transform input values like "2003/06/04" to these "10732..." values to search for objects ?

thank you very much, lennart for clarification !

Jetzt bei WEB.DE FreeMail anmelden = 1qm Regenwald schuetzen! Helfen
Sie mit! Nutzen Sie den Serien-Testsieger. http://user.web.de/Regenwald