John Lister wrote:
> I agree the JDBC spec is vague, but I read the spec such that the
> supplied calendar is *only* used if the server doesn't support a
> timezone. I think my main concern is that setTimestamp behaves
> differently to setTime. I'm not sure which is correct (i'd tend to the
> former) but i think they should behave the same...
The problem is that there's a bit of a disconnect between the server's
idea of time / timestamp with or without timezone, and the Java
representations. java.sql.Time is just a hideous hack to begin with.
It's going to be at best a patch job getting them to fit together.
> I'm not sure what the correct behaviour should be if the server has a
> timezone and you specify one to use. Hopefully the app writer would only
> use this case for none timezone columns/results.... maybe too much to
> ask for :)
I'm reluctant to touch that date/time handling code without an actual
testcase showing a problem. It's quite fragile as it is, and small
changes can have unintended consequences :/
In response to
pgsql-jdbc by date
|Next:||From: Péter Kovács||Date: 2009-05-04 08:27:02|
|Subject: Re: Very strange performance decrease when reusing a PreparedStatement|
|Previous:||From: Kris Jurka||Date: 2009-05-04 00:32:30|
|Subject: Re: Unit test patches|