pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Philippe Marschall <pm@netcetera.ch>
To: Philippe Marschall <pm@netcetera.ch>
To: pgsql-jdbc@lists.postgresql.org
Cc: Dave Cramer <davecramer@gmail.com>
Cc: Mark Rotteveel <mark@lawinegevaar.nl>
Subject: Re: ResultSet.getObject(..., LocalTime.class) not working with Postgres timetz type
Date: Fri, 10 May 2019 13:40:12 +0200
Message-ID: <b4c3ef5b-c38c-32c1-2149-0dd4e52b5f57@netcetera.com> (raw)
In-Reply-To: <CADK3HH+x3NFPsFZ2fmKL8V0LHzsMaVpzXEg2TBjQMTk3vTeFdA@mail.gmail.com>
References: <q89m8j$63i8$1@blaine.gmane.org>
	<f42cc628-83c9-d009-707a-347126539b2d@lawinegevaar.nl>
	<716bbd9d-7708-f73b-7b49-641cc9e2790b@gmx.net>
	<bd979527-35f6-c9cb-74c5-3334a407fedb@netcetera.com>
	<4abc4f90-f704-203b-5da1-215eaf4cf252@lawinegevaar.nl>
	<22d06176-b0f9-13b7-a2e5-8e5b40798d17@netcetera.com>
	<CADK3HH+en1chJjswNhnC6f2W25KMW_iYsf30SRgj4mQny95b4w@mail.gmail.com>
	<0b371da9-a6af-6e39-d5a8-74a2996a954c@netcetera.com>
	<CADK3HH+x3NFPsFZ2fmKL8V0LHzsMaVpzXEg2TBjQMTk3vTeFdA@mail.gmail.com>

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





view thread (15+ messages)

Message-ID: <b4c3ef5b-c38c-32c1-2149-0dd4e52b5f57@netcetera.com>
Permalink:  ../b4c3ef5b-c38c-32c1-2149-0dd4e52b5f57@netcetera.com/
Also on:    postgresql.org/message-id/b4c3ef5b-c38c-32c1-2149-0dd4e52b5f57@netcetera.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pm@netcetera.ch, davecramer@gmail.com, mark@lawinegevaar.nl
  Subject: Re: ResultSet.getObject(..., LocalTime.class) not working with Postgres timetz type
  In-Reply-To: <b4c3ef5b-c38c-32c1-2149-0dd4e52b5f57@netcetera.com>
  References: <q89m8j$63i8$1@blaine.gmane.org> <f42cc628-83c9-d009-707a-347126539b2d@lawinegevaar.nl> <716bbd9d-7708-f73b-7b49-641cc9e2790b@gmx.net> <bd979527-35f6-c9cb-74c5-3334a407fedb@netcetera.com> <4abc4f90-f704-203b-5da1-215eaf4cf252@lawinegevaar.nl> <22d06176-b0f9-13b7-a2e5-8e5b40798d17@netcetera.com> <CADK3HH+en1chJjswNhnC6f2W25KMW_iYsf30SRgj4mQny95b4w@mail.gmail.com> <0b371da9-a6af-6e39-d5a8-74a2996a954c@netcetera.com> <CADK3HH+x3NFPsFZ2fmKL8V0LHzsMaVpzXEg2TBjQMTk3vTeFdA@mail.gmail.com> <b4c3ef5b-c38c-32c1-2149-0dd4e52b5f57@netcetera.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox