Re: Date problem on Aix jdk1.4.1

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Date problem on Aix jdk1.4.1
Дата
Msg-id 42E81AAB.8030005@opencloud.com
обсуждение исходный текст
Ответ на Re: Date problem on Aix jdk1.4.1  ("Byron Nikolaidis" <ByronN@Routescape.com>)
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Byron Nikolaidis"
Дата:
Сообщение: Re: Date problem on Aix jdk1.4.1
Следующее
От: "Byron Nikolaidis"
Дата:
Сообщение: Re: Date problem on Aix jdk1.4.1