Re: Timestamp Conversion Woes Redux - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Timestamp Conversion Woes Redux
Date
Msg-id Pine.BSO.4.56.0507200109220.31980@leary.csoft.net
Whole thread Raw
In response to Re: Timestamp Conversion Woes Redux  (Christian Cryder <c.s.cryder@gmail.com>)
Responses Re: Timestamp Conversion Woes Redux  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc

On Tue, 19 Jul 2005, Christian Cryder wrote:

> I should not have to configure my server to turn daylight savings off
> in order to get stuff to insert into the DB correctly (after all,
> other things run on the same server).

No, you just need to turn it off on that particular connection.  This was
my original suggestion on how to handle this issue.  The attached patch
and built jar files, pass your example test just fine.  I've also put up
your test as a standalone compilable file here.

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

I think this approach is better than trying to infer something from the
particular arguments to setTimestamp because it should just work unless
you are trying to do something tricky.  Unless you are working with a
whole bunch of different timezones on the same connection there is no
need to do anything else.  I mean, if the driver developers can't
figure out the semantics of setTimestamp how can we expect end users to?

Kris Jurka

Attachment

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Timestamp Conversion Woes Redux
Next
From: Oliver Jowett
Date:
Subject: Re: Timestamp Conversion Woes Redux