|
From: Karsten H. <Kar...@gm...> - 2006-01-17 18:36:47
|
Hi all,
we are using pyPgSQL with GNUmed.
When storing a PgDateTime instance (an mx.DateTime
instance, that is) the _quote() function does
"'%s'" % value
Which in turn calls value.__str__().
Wich does the following to its seconds value:
"%02.5f" % self.seconds
In some locales (namely where the decimal separator is
something other than a ".") this will produce (for example)
"25,12"
instead of
"25.12"
for 25 seconds 120 milliseconds
Now, PostgreSQL (properly ?) does not accept "xx,yy" as a
valid timestamp string.
Attached find a crude hack overcoming this problem.
The proper fix would be to make pyPgSQL *force* mx.DateTime to
deliver a valid format via value.Format('...') or some such.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
|