X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 096E352B26 for ; Tue, 26 Jul 2005 02:23:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 01617-06 for ; Tue, 26 Jul 2005 05:23:29 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 57F7C52B0F for ; Tue, 26 Jul 2005 02:23:28 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DxHua-0000uu-TP; Tue, 26 Jul 2005 17:23:28 +1200 Message-ID: <42E5C8D0.1080102@opencloud.com> Date: Tue, 26 Jul 2005 17:23:28 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dave Cramer Cc: "pgsql-jdbc@postgresql.org" Subject: Re: work in progress: timestamp patch References: <42E57D80.4040501@opencloud.com> In-Reply-To: X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.009 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/313 X-Sequence-Number: 13461 Dave Cramer wrote: > I've been messing with it a bit myself, and noticed that > TimeStampUtils.toString used the timezone of the incoming > timestamp, not the calendar. So the call to appendTimeZone, passes in > the timestamp, not the new calendar. I looked at this and the current code is certainly wrong. The timezone offset of a Timestamp (deprecated method!) returns the offset of the JVM's default timezone always. We should indeed be passing the target calendar and using that. I've added that change to my patch. Interestingly none of the regression tests fail with it changed; we're very short on tests that actually test the with-Calendar code.. -O