[Zope] Help
Vangelis Mihalopoulos
mihalop at VTrip.NET
Thu Dec 16 04:21:50 EST 2004
I think i had the same problem once.... what version of MySQL are you
using? My problem was this: After version 4.0 [or 4.1, can't remember
now] MySQL changed the TIMESTAMP return format. ZMySQLDA produced the
same error. So, to fix it [the dirty way], i changed my queries using
unix time conversions like this:
SELECT
ann_id,
content,
subject,
description,
username,
board_id,
from_unixtime(unix_timestamp(published)) AS published,
from_unixtime(unix_timestamp(updated)) AS updated,
from_unixtime(unix_timestamp(expires)) AS expires
FROM announcements
Don't ask why it *worked* neither why i *used* it. It worked, and i
didn't need the "right" solution, just something to keep me within
project submission deadline....
I am sure that there is a better way to deal with this. Anyone else?
Hope this helps.
Vangelis
Loomis, Todd, CTR, DMSO wrote:
> I’m in the process of moving from a linux box to a win32 box and have
> everything up and running nicely. However I’m getting the following
> error when access a table that has a mysql timestamp, any suggestions:
>
> <!--
>
> Traceback (innermost last):
>
> File E:\DMSO-www\lib\python\Products\Hotfix_2002-04-15\__init__.py,
> line 51, in publish_module
>
> File E:\DMSO-www\lib\python\ZPublisher\Publish.py, line 187, in publish
>
> File E:\DMSO-www\lib\python\Zope\__init__.py, line 226, in
> zpublisher_exception_hook
>
> File E:\DMSO-www\lib\python\ZPublisher\Publish.py, line 171, in publish
>
> File E:\DMSO-www\lib\python\ZPublisher\mapply.py, line 160, in mapply
>
> (Object: index)
>
> File E:\DMSO-www\lib\python\ZPublisher\Publish.py, line 112, in
> call_object
>
> (Object: index)
>
> File E:\DMSO-www\lib\python\OFS\DTMLMethod.py, line 195, in __call__
>
> (Object: index)
>
> File E:\DMSO-www\lib\python\DocumentTemplate\DT_String.py, line 546,
> in __call__
>
> (Object: index)
>
> File E:\DMSO-www\lib\python\DocumentTemplate\DT_In.py, line 691, in
> renderwob
>
> (Object: get_nominations)
>
> File E:\DMSO-www\lib\python\Shared\DC\ZRDB\DA.py, line 493, in __call__
>
> (Object: get_nominations)
>
> File E:\DMSO-www\lib\python\Products\ZMySQLDA\db.py, line 293, in query
>
> File E:\DMSO-www\lib\python\MySQLdb\times.py, line 105, in
> mysql_timestamp_converter
>
> ValueError: invalid literal for int(): 0-
>
> -->
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Zope maillist - Zope at zope.org
>http://mail.zope.org/mailman/listinfo/zope
>** No cross posts or HTML encoding! **
>(Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
>
More information about the Zope
mailing list