Re: Date problem on Aix jdk1.4.1

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Byron Nikolaidis <ByronN(at)Routescape(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Date problem on Aix jdk1.4.1
Date: 2005-07-27 23:37:15
Message-ID: 42E81AAB.8030005@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Byron Nikolaidis 2005-07-28 00:08:32 Re: Date problem on Aix jdk1.4.1
Previous Message Byron Nikolaidis 2005-07-27 23:20:24 Re: Date problem on Aix jdk1.4.1