Re: getTiIme/Timestamp with TimeZone inconsistency

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: getTiIme/Timestamp with TimeZone inconsistency
Дата
Msg-id 49FE3A4D.5050704@opencloud.com
обсуждение исходный текст
Ответ на Re: getTiIme/Timestamp with TimeZone inconsistency  (John Lister <john.lister-ps@kickstone.com>)
Список pgsql-jdbc
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 :/

-O


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Unit test patches
Следующее
От: Péter Kovács
Дата:
Сообщение: Re: Very strange performance decrease when reusing a PreparedStatement