Re: problem with timezone parsing

James Henstridge <[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
On Tue, Feb 24, 2009 at 4:27 AM, Federico Di Gregorio <fog-NGVKUo/i/[email protected]> wrote:
> Il giorno mer, 18/02/2009 alle 23.18 +0100, Karsten Hilbert ha scritto:
>> On Wed, Feb 18, 2009 at 09:29:47PM +0100, Karsten Hilbert wrote:
>>
>> > > Note that in released versions of psycopg2, the DATETIME caster will
>> > > sometimes succeed but give an incorrect result (any negative UTC
>> > > offset that isn't a whole number of hours).  So you might be best off
>> > > doing the time zone parsing yourself if it is important to you.
>> >
>> > Anyway, I'll put in a warning and hope for a new psycopg2
>> > release soon :-)
>>
>> So there :-)
>
> Hi,
>
> I'd like to add your code to cope with "bad" timezones to
> psycopg2.extras for next release. Do you care about tidying it and
> providing a call like register_uuid() or register_inet() that will
> install the type-caster?

For what it is worth, I submitted a bug report about the time zone
limitations here:
    http://bugs.python.org/issue5288

It won't help solve the problem for released versions of Python, but
perhaps we could get it fixed for a future version.

James.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.