Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E95021336473 for ; Sun, 19 Sep 2010 18:43:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 08301-07 for ; Sun, 19 Sep 2010 21:43:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id BF9FB1335ED4 for ; Sun, 19 Sep 2010 18:43:27 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o8JLhLYF009642; Sun, 19 Sep 2010 17:43:21 -0400 (EDT) To: Oliver Jowett cc: Lukas Eder , pgsql-jdbc@postgresql.org Subject: Re: java.sql.ResultSet.getTime() returns wrong time In-reply-to: <4C968069.4050801@opencloud.com> References: <4C968069.4050801@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Mon, 20 Sep 2010 09:28:09 +1200" Date: Sun, 19 Sep 2010 17:43:20 -0400 Message-ID: <9641.1284932600@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/38 X-Sequence-Number: 20908 Oliver Jowett writes: > Did you see Kris's earlier response here? See > http://archives.postgresql.org/pgsql-jdbc/2010-05/msg00052.php. The > problem is we need to pass around a timezone offset, but JDBC + > java.util.Date give us no way to do that without subclassing those types > (which seems a bit hairy). Without that extra data, timetz just doesn't > map well to any of the standard Java date/time types. timetz is a fundamentally brain-dead data type to start with --- it simply doesn't carry enough information to deal with timezones meaningfully, at least not once you start considering DST changes. This is the SQL standard's fault not ours, so there's not a lot we can do about it other than recommend people avoid timetz. regards, tom lane