[Zope] Re: ZMySQLDA 2.0.0 and Time fields

Andy Dustman andy@dustman.net
Thu, 1 Mar 2001 20:53:59 -0500 (EST)


How about 2.0.4?

On Fri, 2 Mar 2001, Peter Bengtsson wrote:

> Got it! Hacked it :)
> 
> In ZMySQLDA 2.0.0 there is a bug when using a time field.
> What happened was that when I select-query a table with TIME (not datetime
> or timestamp or date or anything normal like that)
> The ZMySQLDA tried to convert that using DateTime. That failed.
> >>> print DateTime('00:00:01')
> Traceback (innermost last):
>   File "<pyshell#4>", line 1, in ?
>     print DateTime('00:00:01')
>   File "C:\Program Files\Zopesite\lib\python\DateTime\DateTime.py", line
> 711, in __init__
>     yr,mo,dy,hr,mn,sc,tz=self._parse(arg)
>   File "C:\Program Files\Zopesite\lib\python\DateTime\DateTime.py", line
> 1050, in _parse
>     raise self.SyntaxError, string
> Invalid Date-Time String: 00:00:01
> 
> 
> Solution:
> Somewhere in db.py search for DateTime from bottom and up. The first line
> there can be removed from the conv {}-dict. Let it be.
> 
> Peter
> 

-- 
Andy Dustman         PGP: 0xC72F3F1D
    @       .net     http://dustman.net/andy
"Normally with carbonara you use eggs, but I used lobster brains instead."
    -- Masahiko Kobe (Iron Chef Italian): 30-year-old Giant Lobster Battle