Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hP3t7-0006WX-Lh for pgsql-jdbc@arkaria.postgresql.org; Fri, 10 May 2019 11:40:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hP3t3-0000xJ-KT for pgsql-jdbc@arkaria.postgresql.org; Fri, 10 May 2019 11:40:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hP3t3-0000x0-D5 for pgsql-jdbc@lists.postgresql.org; Fri, 10 May 2019 11:40:25 +0000 Received: from mail.netcetera.ch ([194.126.145.7] helo=mail.netcetera.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hP3sw-0007C6-Ma for pgsql-jdbc@lists.postgresql.org; Fri, 10 May 2019 11:40:24 +0000 Received: from xguard.netcetera.com (xguard.netcetera.com [192.168.8.150]) by mail.netcetera.com (8.14.7/8.14.1) with ESMTP id x4ABeGHG053485; Fri, 10 May 2019 13:40:16 +0200 Received: from xguard (localhost [127.0.0.1]) by xguard.netcetera.com (Postfix) with ESMTP id 0321B68073E; Fri, 10 May 2019 13:40:16 +0200 (CEST) Authentication-Results: auth.opendkim.xorlab.com; dkim=none; dkim-atps=neutral Received: from netcetera.com (unknown [172.16.0.139]) by xguard.netcetera.com (Postfix) with ESMTPS id 45BEB68073E; Fri, 10 May 2019 13:40:13 +0200 (CEST) Received: from Philippes-MacBook.local ([172.19.119.6]) by netcetera.com (8.14.7/8.14.1) with ESMTP id x4ABeC4Q007703; Fri, 10 May 2019 13:40:12 +0200 Subject: Re: ResultSet.getObject(..., LocalTime.class) not working with Postgres timetz type To: Philippe Marschall , pgsql-jdbc@lists.postgresql.org Cc: Dave Cramer , Mark Rotteveel References: <716bbd9d-7708-f73b-7b49-641cc9e2790b@gmx.net> <4abc4f90-f704-203b-5da1-215eaf4cf252@lawinegevaar.nl> <22d06176-b0f9-13b7-a2e5-8e5b40798d17@netcetera.com> <0b371da9-a6af-6e39-d5a8-74a2996a954c@netcetera.com> From: Philippe Marschall Message-ID: Date: Fri, 10 May 2019 13:40:12 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,UNPARSEABLE_RELAY autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sgaNetcetera List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 19.04.19 15:36, Dave Cramer wrote: > > > On Thu, 18 Apr 2019 at 13:19, Philippe Marschall > 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