Re: java.sql.ResultSet.getTime() returns wrong time - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: java.sql.ResultSet.getTime() returns wrong time
Date
Msg-id 9641.1284932600@sss.pgh.pa.us
Whole thread Raw
In response to Re: java.sql.ResultSet.getTime() returns wrong time  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: java.sql.ResultSet.getTime() returns wrong time  (Lukas Eder <lukas.eder@gmail.com>)
List pgsql-jdbc
Oliver Jowett <oliver@opencloud.com> writes:
> Did you see Kris's earlier response here? See
> http://archives.postgresql.org/pgsql-jdbc/2010-05/msg00052.php. The
> problem is we need to pass around a timezone offset, but JDBC +
> java.util.Date give us no way to do that without subclassing those types
> (which seems a bit hairy). Without that extra data, timetz just doesn't
> map well to any of the standard Java date/time types.

timetz is a fundamentally brain-dead data type to start with ---
it simply doesn't carry enough information to deal with timezones
meaningfully, at least not once you start considering DST changes.
This is the SQL standard's fault not ours, so there's not a lot
we can do about it other than recommend people avoid timetz.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: java.sql.ResultSet.getTime() returns wrong time
Next
From: "Bremer, Gerd"
Date:
Subject: Re: Upload latest JDBC driver releases to Maven Central