Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 428E79F9F0E for ; Thu, 9 Nov 2006 17:54:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 21972-10 for ; Thu, 9 Nov 2006 17:54:19 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by postgresql.org (Postfix) with ESMTP id 9F6529F9D99 for ; Thu, 9 Nov 2006 17:54:17 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id x4so997756nfb for ; Thu, 09 Nov 2006 13:54:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sTQFowdpgSotIqvuMpfLBKts37yzQhhrdQhNgGW7FlWDb6cKzW/841x1VmXro0bGNsaHlFyIsjHKTMwr6xcl4uTbFgA184vzDYleBXDt9/Sv9tqOtnWKujqXXXSPI6wlgBVdidQp2o9a1+t8G2inQojfqusl8HSiHfNKWkpQxn4= Received: by 10.82.111.8 with SMTP id j8mr245868buc.1163109255302; Thu, 09 Nov 2006 13:54:15 -0800 (PST) Received: by 10.82.161.3 with HTTP; Thu, 9 Nov 2006 13:54:15 -0800 (PST) Message-ID: <1f30b80c0611091354x4a9b4cebk3bd0643e5d5b8a18@mail.gmail.com> Date: Fri, 10 Nov 2006 02:54:15 +0500 From: imad To: "Richard Cook" Subject: Re: Bug in TimestampUtils.java? Cc: pgsql-jdbc@postgresql.org In-Reply-To: <20061109201629.17691.qmail@web60221.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061109201629.17691.qmail@web60221.mail.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/42 X-Sequence-Number: 16084 On 11/10/06, Richard Cook wrote: > > Hi All, > > I recently ran into a problem that was partially caused by some behaviour I > found in TimestampUtils.java. To me it does not seem right... > > I retrieved a Timestamp Column from Postgres as a Date. The data in the > database had a timezone of GMT -0500, the current time was also in GMT > -0500. If you look at the date that is returned from resultSet.getDate() on > a Timestamp column, the timezone for the Date object is -0400. I would think > that it should be -0500. I suggest you to confirm it with your database server. Try developing the same scenario without JDBC and see what you get because connectors are not supposed to play with the data they get. It is the server who formats everything before sending it to the client. --Imad www.EnterpriseDB.com