Re: ResultSet.getObject(..., LocalTime.class) not working withPostgres timetz type - Mailing list pgsql-jdbc

From Philippe Marschall
Subject Re: ResultSet.getObject(..., LocalTime.class) not working withPostgres timetz type
Date
Msg-id b4c3ef5b-c38c-32c1-2149-0dd4e52b5f57@netcetera.com
Whole thread Raw
In response to Re: ResultSet.getObject(..., LocalTime.class) not working withPostgres timetz type  (Dave Cramer <davecramer@gmail.com>)
List 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 by date:

Previous
From: David Wall
Date:
Subject: Re: Java 8 OffsetDateTime clarification
Next
From: Anupkumar Seth
Date:
Subject: SSL connection issue with JDBC