Re: Problems storing timestamps with calendars - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Problems storing timestamps with calendars
Date
Msg-id Pine.BSO.4.56.0504290425001.11511@leary.csoft.net
Whole thread Raw
In response to Problems storing timestamps with calendars  (Martin Keller <martin.keller@unitedplanet.de>)
Responses Re: Problems storing timestamps with calendars
List pgsql-jdbc

On Wed, 27 Apr 2005, Martin Keller wrote:

> We have some trouble with storing timestamps via
> PreparedStatement.setTimestamp(int, Timestamp, Calendar) into a
> timestamp column without timezone.
> It looks like that the timestamp values are adjusted in the wrong
> direction if the timezone of the calendar is not the default timezone of
> the java vm.
>
> Are we doing anything wrong or is this a bug?
>

Something is definitely wrong here.  At first glance it doesn't look
like it's related to the vm timezone, but instead
AbstractJdbc2Statement.changeTime should be respecting Add for the DST
offset, but I'm not quite sure of that.  It gets complicated when you've
got to consider four different possible timezones (server, vm, timestamp,
calendar).  Does this jar file fix things for you?

http://www.ejurka.com/pgsql/jars/mk/

Kris Jurka

pgsql-jdbc by date:

Previous
From: Antony Paul
Date:
Subject: Re: Impact of open ResultSets and PreparedStatements ?
Next
From: Kris Jurka
Date:
Subject: Re: Impact of open ResultSets and PreparedStatements ?