Skip site navigation (1) Skip section navigation (2)

Re: Bug in timezone-parsing?

From: Kris Jurka <books(at)ejurka(dot)com>
To: villeja(at)avoltus(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug in timezone-parsing?
Date: 2007-04-16 15:36:43
Message-ID: Pine.BSO.4.64.0704161130290.24838@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-jdbc

On Mon, 16 Apr 2007, villeja(at)avoltus(dot)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

In response to

Responses

pgsql-jdbc by date

Next:From: Tom LaneDate: 2007-04-16 16:06:43
Subject: Re: Bug in timezone-parsing?
Previous:From: vasylenkoDate: 2007-04-16 14:35:19
Subject: How to modify my class inherited from java.sql.Array

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group