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 5D69C52BE6 for ; Wed, 27 Jul 2005 20:37:18 -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 06642-09 for ; Wed, 27 Jul 2005 23:37:13 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 278CE52BD6 for ; Wed, 27 Jul 2005 20:37:12 -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 1DxvSd-0002vA-VV; Thu, 28 Jul 2005 11:37:16 +1200 Message-ID: <42E81AAB.8030005@opencloud.com> Date: Thu, 28 Jul 2005 11:37:15 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Byron Nikolaidis Cc: pgsql-jdbc@postgresql.org Subject: Re: Date problem on Aix jdk1.4.1 References: <6E0907A94904D94B99D7F387E08C4F570732F0@FALCON.INSIGHT> In-Reply-To: <6E0907A94904D94B99D7F387E08C4F570732F0@FALCON.INSIGHT> 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/385 X-Sequence-Number: 13533 Byron Nikolaidis wrote: > Here is a really simple test: > /usr/java14/bin/java -cp "/usr/insight/postgresql.jar:." DateTest > > id=1, effective=1122350400000 <--- correct > id=2, effective=1122354000000 <--- +1 hour > id=3, effective=1122354000000 <--- all same from here out It seems ok under 1.4.2 on Linux, with driver build 310, in NZST: id=1, effective=1122292800000 id=2, effective=1122292800000 id=3, effective=1122292800000 What timezone is the AIX box in exactly? Can you try a 1.4.2 JVM on there? The only thing I can think of is some sort of Calendar modification caused by the first getDate() is carrying over to subsequent calls (the calendar used is shared between calls), but given that the only thing that code really touches is the zone/dst offsets, and they're reset each time, I'm not sure what exactly it would be. You could try putting something like System.err.println("calendar: " + cal); in org.postgresql.jdbc2.TimestampUtils.toDate() around line 253, just before the return, and see if there are any notable differences between the first and second calls.. -O