Re: Bug in timezone-parsing? - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Bug in timezone-parsing?
Date
Msg-id Pine.BSO.4.64.0704161130290.24838@leary.csoft.net
Whole thread Raw
In response to Bug in timezone-parsing?  (villeja@avoltus.com)
Responses Re: Bug in timezone-parsing?  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc

On Mon, 16 Apr 2007, villeja@avoltus.com wrote:

> I found a problem with the parsing of timezone-offsets in the current
> PG-driver. It seems something weird happened between 1921 and 1922, as the
> offset changes from hour-precision to second-precision:
>
> postgres=> select '1921-01-01'::timestamptz, '1922-01-01'::timestamptz;
>         timestamptz          |      timestamptz
> ------------------------------+------------------------
> 1921-01-01 00:00:00+01:39:52 | 1922-01-01 00:00:00+02
>
> Trying to read a value like this will throw an exception, although the older
> drivers were able to parse it just fine.

Timezone offsets with seconds are new in the 8.2 server and the driver was
never updated for them.  Older drivers don't have as much error detection
and silently ignore the second portion while newer drivers complain that
they're getting something they don't expect.

Will fix, thanks for the complete report.

Kris Jurka

pgsql-jdbc by date:

Previous
From: villeja@avoltus.com
Date:
Subject: Bug in timezone-parsing?
Next
From: Tom Lane
Date:
Subject: Re: Bug in timezone-parsing?