[DB-SIG] Last round for DB API 1.1

Andy Dustman adustman@comstar.net
Wed, 17 Mar 1999 17:29:25 -0500 (EST)

On Wed, 17 Mar 1999, M.-A. Lemburg wrote:

> Ah, something else I've noticed with the latest version of MySQL:
> something in the way of handling time and timestamps changed causing
> those values to be corrupted in case they include a seconds fraction
> part, e.g. '12:30:45.5' won't make it into the database, '12:30:45.00'
> will show up as '00:00:00'. Since the DateTime types produce
> strings *with* fraction by default, you'll probably have to use
> the .strftime() methods to pass strings without the fraction part
> to MySQL.

This doesn't seem to happen with the TIMESTAMP type, if I send it
str(<DateTime Object>). It truncates the fractional seconds, but otherwise
it's okay. Produces a warning as well (on my interface, you can set
whether or not Warning should be raised on a per-cursor basis).

I have not tried other time types, but could this by a myODBC problem?

Andy Dustman  (ICQ#32922760)    You should always say "spam" and "eggs"
ComStar Communications Corp.                 instead of "foo" and "bar"
(706) 549-7689 | PGP KeyID=0xC72F3F1D   in Python examples. (Mark Lutz)