[Zope-DB] Pre 1970 dates crashing, DCOracle2
Remy Pinsonnault
remy_pinsonnault at roche.ca
Mon May 3 10:22:09 EDT 2004
It crashes my machine so hard that I have to reboot every time... It gives
me a fatal python error and the zope service keeps trying to restart (I
can't click stop or start).
One solution is to convert all dates to strings with the to_char function
but...
-----Original Message-----
From: Matthew T. Kromer [mailto:matt at bane.mi.org]
Sent: May 2, 2004 9:22 AM
To: Chris Withers
Cc: zope-db at zope.org; remy_pinsonnault at roche.ca
Subject: Re: [Zope-DB] Pre 1970 dates crashing, DCOracle2
I know I put a specific 1970-2037 range in to handle the mktime() call.
Windows mktime() pukes if the year is out of that range.
DCOracle2 DateTimes maintain a int value from the unix epoch if they
can so that you can int() one. It is very unsophisticated, and usually
the time zone conversion hassles will drive you bonkers. I'm not even
100% sure that all the time zone conversion to the int format is
symmetric, although it tries to be.
You can see the relevant diff at
http://cvs.zope.org/Products/DCOracle2/src/dco2.c.diff?
r1=1.131&r2=1.132
down at the bottom.
On May 2, 2004, at 8:49 AM, Chris Withers wrote:
> Matthew T. Kromer wrote:
>> If you are on windows, the support code for dates may be at issue;
>> I'd try to get the latest source code from CVS -- there was a change
>> that went in around revision 1.132 of the code (the current is 1.137)
>> that altered the way time handling is done on Windows to try to
>> mitigate the symptoms you're describing.
>
> Are you sure this isn't just an artifact of the fact that Zope's
> DateTime class can't store dates before 1970?
>
> Chris
>
> --
> Simplistix - Content Management, Zope & Python Consulting
> - http://www.simplistix.co.uk
More information about the Zope-DB
mailing list