Re: ResultSet.getObject(..., LocalTime.class) not working withPostgres timetz type

Поиск
Список
Период
Сортировка
От Philippe Marschall
Тема Re: ResultSet.getObject(..., LocalTime.class) not working withPostgres timetz type
Дата
Msg-id b4c3ef5b-c38c-32c1-2149-0dd4e52b5f57@netcetera.com
обсуждение исходный текст
Ответ на Re: ResultSet.getObject(..., LocalTime.class) not working withPostgres timetz type  (Dave Cramer <davecramer@gmail.com>)
Список pgsql-jdbc
On 19.04.19 15:36, Dave Cramer wrote:
> 
> 
> On Thu, 18 Apr 2019 at 13:19, Philippe Marschall <pm@netcetera.ch 
> <mailto:pm@netcetera.ch>> wrote:
> 
>     On 17.04.19 19:10, Dave Cramer wrote:
>      > Not everyone agrees with WITH TIMEZONE qnd it doesn't help that the
>      > server does not store the timezone
> 
>     It is my understanding the server converts to UTC when storing and
>     returns UTC.
> 
> 
> Yes, so the problem becomes what Timezone should we convert it to ? The 
> server timezone, or the client timezone?

I don't think we should do conversion. To me JDBC in an interface to the 
database, it exposes the database functionality, behavior and semantics. 
I personally expect JDBC to return what the database returns. If I want 
to have it converted to something else then I have to do that with the 
semantics I want.
Java 8 Date Time types allow us to do exactly this.

Cheers
Philippe



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

Предыдущее
От: David Wall
Дата:
Сообщение: Re: Java 8 OffsetDateTime clarification
Следующее
От: Anupkumar Seth
Дата:
Сообщение: SSL connection issue with JDBC