Re: ResultSet.getObject(..., LocalTime.class) not working with Postgres timetz type
Philippe Marschall <[email protected]> Fri, 10 May 2019 13:40:12 +0200
| Newsgroups | gmane.comp.db.postgresql.jdbc |
|---|---|
| Message-ID | <[email protected]> |
On 19.04.19 15:36, Dave Cramer wrote: > > > On Thu, 18 Apr 2019 at 13:19, Philippe Marschall <[email protected] > <mailto:[email protected]>> 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