Re: work in progress: timestamp patch - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: work in progress: timestamp patch
Date
Msg-id 42E5C8D0.1080102@opencloud.com
Whole thread Raw
In response to Re: work in progress: timestamp patch  (Dave Cramer <pg@fastcrypt.com>)
Responses Re: work in progress: timestamp patch  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
Dave Cramer wrote:

> I've been messing with it a bit myself, and noticed that
> TimeStampUtils.toString used the timezone of the incoming
> timestamp, not the calendar. So the call to appendTimeZone, passes in
> the timestamp, not the new calendar.

I looked at this and the current code is certainly wrong. The timezone
offset of a Timestamp (deprecated method!) returns the offset of the
JVM's default timezone always. We should indeed be passing the target
calendar and using that.

I've added that change to my patch. Interestingly none of the regression
tests fail with it changed; we're very short on tests that actually test
the with-Calendar code..

-O

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: work in progress: timestamp patch
Next
From: Gary Chen
Date:
Subject: UNSUBSCRIBE