Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 39BE2650366 for ; Wed, 9 Jul 2008 01:29:39 -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 33539-04-4 for ; Wed, 9 Jul 2008 01:29:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www01.kensystem.com (www01.kensystem.com [72.19.170.120]) by postgresql.org (Postfix) with ESMTP id CB9CA650551 for ; Wed, 9 Jul 2008 01:09:01 -0300 (ADT) Received: from 192.168.0.3 by www01.kensystem.com (SMTPD); id s20080709040856.248276; Wed, 09 Jul 2008 04:08:56 Message-ID: <487439D8.2050508@kensystem.com> Date: Tue, 08 Jul 2008 22:08:56 -0600 From: Ken Johanson User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: Oliver Jowett CC: pgsql-jdbc@postgresql.org Subject: Re: Timestamp without Timezone and differing client / server tzs References: <4873154E.6020808@kensystem.com> <4873201F.1000700@opencloud.com> In-Reply-To: <4873201F.1000700@opencloud.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/14 X-Sequence-Number: 18799 Oliver Jowett wrote: > Ken Johanson wrote: > >> Question: with ts without tz storage, should not a timestamp be >> normalized to the servers implicit TZ (UTC in this case), since that >> is set in the config's client-tz? > > If you don't specify a Calendar to setTimestamp, it's assumed you mean > the client JVM's default timezone (the same timezone that > Timestamp.toString() assumes). ....... > If you want to interpret a Timestamp as being in a particular timezone, > use the getTimestamp()/setTimestamp() variants that take an explicit > Calendar. 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? k