Hi, i need to find a date stored in a ZCataolg. the problem is that the date has a time in it ( '2000/01/01 12:00:00 GMT+1' ) that i dont know. i tried to turn the index type of the date to textindex, but that didn't work because only letters are stored in it ( 'GMT' ). if this would work i could just search for the date because it gets seperated by blanks when it is put into the catalog ( '2000/01/01', '12:00:00', 'GMT+1' ). MfG Steffen
Steffen Hausmann wrote:
i need to find a date stored in a ZCataolg. the problem is that the date has a time in it ( '2000/01/01 12:00:00 GMT+1' ) that i dont know.
ZCatalog really wants a 'DateTime' Plugin Index that lets you do these kind of searches. Maybe something for dev.zope.org? cheers, Chris
Steffen Hausmann writes:
i need to find a date stored in a ZCataolg. the problem is that the date has a time in it ( '2000/01/01 12:00:00 GMT+1' ) that i dont know.
i tried to turn the index type of the date to textindex, but that didn't work because only letters are stored in it ( 'GMT' ). if this would work i could just search for the date because it gets seperated by blanks when it is put into the catalog ( '2000/01/01', '12:00:00', 'GMT+1' ). You need a "range" query to successfully search dates.
Look in the Zope book or <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> for details. As you are in the european timezone, you may be hit by a bug in Zope's DateTime module: DateTime('yyyy/mm/dd') != DateTime(yyyy,mm,dd) because one respects the time zone, the other does not. Dieter
participants (3)
-
Chris Withers -
Dieter Maurer -
Steffen Hausmann