Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 86EA36506A0 for ; Wed, 9 Jul 2008 01:58:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 65310-07 for ; Wed, 9 Jul 2008 01:58:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by postgresql.org (Postfix) with ESMTP id E3B2F650708 for ; Wed, 9 Jul 2008 01:52:26 -0300 (ADT) Received: from deluge.opencloud.co.nz ([192.168.0.16]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KGRfE-0005V9-7p; Wed, 09 Jul 2008 16:52:24 +1200 Message-ID: <48744407.6090101@opencloud.com> Date: Wed, 09 Jul 2008 16:52:23 +1200 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: Ken Johanson CC: pgsql-jdbc@postgresql.org Subject: Re: Timestamp without Timezone and differing client / server tzs References: <4873154E.6020808@kensystem.com> <4873201F.1000700@opencloud.com> <487439D8.2050508@kensystem.com> <48743B53.4000002@opencloud.com> <4874405E.6030608@kensystem.com> In-Reply-To: <4874405E.6030608@kensystem.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/19 X-Sequence-Number: 18804 Ken Johanson wrote: > Oliver Jowett wrote: >> Ken Johanson wrote: >> >>> So, short of passing a calendar to setTimezone, there is no other way >>> to indicate to the driver that zone-less date/time type values should >>> be translated to the server's different timezone, is this correct? >> >> You could change the client JVM's default timezone I suppose. >> >> I still don't understand exactly what you are trying to do, though. >> > > To be sure, is the intent of the server's > > timezone = UTC > > config parameter, not to provide a hint to the clients about which > implicit timezone it treats zone-less strings as? That's not the intent as I understand it. It tells the server how to interpret zone-less string literals (which the JDBC driver never actually generates), how to cast between with-timezone and without-timezone values by default, and which timezone the default representation of with-timezone strings should use (which doesn't change the instant in time they represent anyway). So the only thing it should visibly affect if you're using JDBC is the casting behaviour. See section 8.5.1.3 in http://www.postgresql.org/docs/8.3/static/datatype-datetime.html -O