Re: Bug in storing Timestamp

From: Boris Kirzner <borisk(at)mainsoft(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug in storing Timestamp
Date: 2005-04-21 12:39:03
Message-ID: 42679EE7.4000002@mainsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Kris Jurka wrote:

>I am not able to reproduce this problem. The attached test case shows a
>problem with storing java.sql.Time into a timetz type because the correct
>offset is not saved, but that's not what you've described. Perhaps it is
>something specific to your timezone?
>
>Kris Jurka
>

Hello Kris
After more investigation I found that the bug I'm talking about can be
reproduced on timestamp column also.

The configuration is as follows :
PostgeSQL runs on WindowsXP that has "Automatically adjust clock for dst
savings" OFF, timezone is (GMT+02:00) Jerusalem
Client runs on WindowsXP that has "Automatically adjust clock for dst
savings" OFF , timezone is (GMT+02:00) Jerusalem

The test stores 2004-08-09 20:30:15.50 timestamp into a table and
immediately fetches it.
Actual result : the value fetched is 2004-08-09 21:30:15.5
Expected result : the value fetched is 2004-08-09 20:30:15.5

Note : if you set client's "Automatically adjust clock for dst savings"
to ON, the test passes.

Attached are test and table sql.

Thanks,
Boris

--
Boris Kirzner
Mainsoft Corporation
http://www.mainsoft.com

Attachment Content-Type Size
PostgreSQL_Timestamp_Test.java text/java 3.1 KB
PostgreSQL_Timestamp_Test.sql text/plain 119 bytes

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas O'Dowd 2005-04-21 14:36:25 Array support
Previous Message Oliver Siegmar 2005-04-21 09:07:00 Interval support for Postgres