Re: mxDateTime timestamps with locale active

Daniele Varrazzo <[email protected]> Tue, 25 May 2010 14:43:35 +0100
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
On Tue, May 25, 2010 at 1:18 PM, Karsten Hilbert
<[email protected]> wrote:

> So, GNUmed used a custom typecaster to convert "," to "."
> when adapting mxDateTimes. Note that we've been around using
> psycopg2 before Python came with a usable standard lib
> datetime module...

Fair enough: my only exposition to mx.datetime dates back to python 2.2.

> It seems the problem does not exist with psycopg2 anymore as
> I cannot make it happen any longer.

I think the problem was fixed in rev. 2.0.7 [1]. It seems that
currently psycopg2 doesn't rely on mxDT.ISO at all, but uses its own
string formatting unaware from the locale. So it appears the
typecaster is not required anymore. But as said, if you had to take
special measures to make psycopg work with gnumed, it would be nice to
know it and consider your workarounds as evidence of problems to be
fixed.

[1] https://dndg.it/cgi-bin/gitweb.cgi?p=public/psycopg2.git;a=commitdiff;h=46bf23caf47c3f08194e524312b5afbe0c449b70


-- Daniele