Re: Re: [Zope] Magic behavior of DateIndex in a ZCatalog
- 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().
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 Is this DateTime index somehow useful (for searching?) in my catalog or should I throw 'em out ? -nico ______________________________________________________________________________ UNICEF bittet um Spenden fur die Kinder im Irak! Hier online an UNICEF spenden: https://spenden.web.de/unicef/special/?mc=021101
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.
participants (2)
-
Lennart Regebro -
Nico Grubert