Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id AEF339FB2F1 for ; Fri, 10 Nov 2006 12:19:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 80078-09 for ; Fri, 10 Nov 2006 16:19:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web60222.mail.yahoo.com (web60222.mail.yahoo.com [209.73.178.110]) by postgresql.org (Postfix) with SMTP id 3D6649FA3A7 for ; Fri, 10 Nov 2006 12:19:41 -0400 (AST) Received: (qmail 19584 invoked by uid 60001); 10 Nov 2006 16:19:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type; b=5zcVJ3853NfQl2Dgtztfo9RZ1DMxefYTO4sncVeGUzwDgJ+KuDvzrOYk/Tc1mcAhE01+jpbP1fgrYThsOt8EBog6Tker9tjuckZwS+TFKMnCIlwg7koMsaARHdL135wI8OXr1te/RROK1wZkWGXTC8KkzUw439GLQaaqqu2AVR0= ; Message-ID: <20061110161940.19582.qmail@web60222.mail.yahoo.com> Received: from [65.223.207.194] by web60222.mail.yahoo.com via HTTP; Fri, 10 Nov 2006 08:19:40 PST Date: Fri, 10 Nov 2006 08:19:40 -0800 (PST) From: Richard Cook Subject: Re: Bug in TimestampUtils.java? To: Oliver Jowett Cc: imad , pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1309249086-1163175580=:18868" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/52 X-Sequence-Number: 16094 --0-1309249086-1163175580=:18868 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable Oliver,=0A=0ABelow is the debug output from TimestampUtils.java=0A=0AIt par= ses the date string that says -05 into an -0400 Date object.=0A=0ARich=0A= =0A=0ADate String: 2006-10-29 23:00:00-05=0A=0Adebug output ---> Parsed dat= e '2006-10-29 23:00:00-05' in zone America/New_York as 2006-10-29 AD 00:00:= 00 -0400 (millis=3D1162094400000)=0A=0A=0A=0A----- Original Message ----=0A= From: Oliver Jowett =0ATo: Richard Cook =0ACc: imad ; pgsql-jdbc@postgresql.org=0ASent: Frida= y, November 10, 2006 1:20:05 AM=0ASubject: Re: [JDBC] Bug in TimestampUtils= .java?=0A=0ARichard Cook wrote:=0A=0A> If you look at the source code for t= he postgres jdbc driver, it =0A> retrieves the column as a string, then use= s the TimeStampUtils class to =0A> create a date or timestamp out of it. I = think the driver is incorrectly =0A> setting the timezone when it creates t= he Date object.=0A=0AI missed the original post here, but if you retrieve t= he result as a =0AString what do you get? (the exact value please) .. and h= ow does that =0Acompare to the Date you get?=0A=0A-O=0A=0A=0A=0A=0A --0-1309249086-1163175580=:18868 Content-Type: text/html; charset=ascii Content-Transfer-Encoding: quoted-printable
Oliver,

Below is the debug output from TimestampUtils.java
It parses the date string that says -05 into an -0400 Date object.

= Rich


Date String: 2006-10-29 23:00:00-05

debug output ---= > Parsed date '2006-10-29 23:00:00-05' in zone America/New_York as 2006-= 10-29 AD 00:00:00 -0400 (millis=3D1162094400000)



--= --- Original Message ----
From: Oliver Jowett <oliver@opencloud.com&g= t;
To: Richard Cook <awhig@yahoo.com>
Cc: imad <immaad@gmail= .com>; pgsql-jdbc@postgresql.org
Sent: Friday, November 10, 2006 1:20= :05 AM
Subject: Re: [JDBC] Bug in TimestampUtils.java?

Richa= rd Cook wrote:

> If you look at the source code for the postgres jdbc dr= iver, it
> retrieves the column as a string, then uses the TimeStamp= Utils class to
> create a date or timestamp out of it. I think the d= river is incorrectly
> setting the timezone when it creates the Date= object.

I missed the original post here, but if you retrieve the re= sult as a
String what do you get? (the exact value please) .. and how d= oes that
compare to the Date you get?

-O

--0-1309249086-1163175580=:18868--