Skip site navigation (1) Skip section navigation (2)

Re: Bug in storing Timestamp

From: Kris Jurka <books(at)ejurka(dot)com>
To: Boris Kirzner <borisk(at)mainsoft(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Bug in storing Timestamp
Date: 2005-04-21 18:27:50
Message-ID: Pine.BSO.4.56.0504211324350.5816@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-jdbc

On Thu, 21 Apr 2005, Boris Kirzner wrote:

> 
> 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?
> >
> 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


This is a known bug in the 8.0 driver and seems different than your 
original complaint.  Being off by an hour (the difference between the two 
timezones) is the expected (and incorrect) behavior that I expected to 
see.  Your original complaint was off by 20:40 which is an unusual number, 
are you still seeing that?

Kris Jurka


In response to

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2005-04-21 18:32:11
Subject: Re: Interval support for Postgres
Previous:From: Kris JurkaDate: 2005-04-21 18:24:18
Subject: Re: switching from 7.4.1 to 8.0-311 jdbc driver

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group