[Zope-CMF] Optimizing catalog queries
Tres Seaver
tseaver at zope.com
Mon Nov 10 19:33:43 EST 2003
On Mon, 2003-11-10 at 14:40, Chris McDonough wrote:
> DateRangeIndexes and DateIndexes are broken for dates past Y2038 (see
> http://www.dewtronics.com/y2038.html). I think CMF's DublinCore
> CEILING_DATE needs to change to one second before the Y2038 cutoff. You
> could try this in your own copy, leaving the date/daterange indexes the
> way they are...
Actually, it would be better to change the CMF's DublinCore to return
None instead of the bogus ceiling / floor dates; the DRIs will then do
the "Right Thing" about half-open intervals.
If you get this done, I would accept it as a patch, even for the 1.3
line (assuming that we ever have to release another 1.3.x).
>
> On Mon, 2003-11-10 at 12:48, Seb Bacon wrote:
> > Gitte Wange wrote:
> > >>Okay :-)
> > >>I have changed the indexes now but couldn't change the index for 'expires'.
> > >>I simply got an Overflow Error, because the date it tried to index is
> > >>9998/12/31 and the _convert method raised an overflow error. I can see that
> > >>there is a long time untill year 9998 but shouldn't it be able to handle
> > >>such a date ?
> > >>Will try an Google for answers.
> > >
> > >
> > > Google found the answer for me - a collector issue #710 from december last
> > > year :-(
> > > Doesn't look like there's a fix for this comming up ...
> >
> > A quick hack which would almost certainly work for you: try changing the
> > line which raises an OverflowError to "return sys.maxint".
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope-CMF
mailing list