Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 09E0C63347D for ; Tue, 18 May 2010 18:40:47 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 20198-10 for ; Tue, 18 May 2010 21:40:39 +0000 (UTC) X-Greylist: delayed 00:05:01.145368 by SQLgrey-1.7.6 Received: from mail.abstraxion.de (unknown [77.37.21.42]) by mail.postgresql.org (Postfix) with ESMTP id 3D367632C14 for ; Tue, 18 May 2010 18:40:39 -0300 (ADT) Received: from webmail.axn-software.de (softdnserr [::ffff:77.37.21.42]) by vs1404 with esmtp; Tue, 18 May 2010 23:35:35 +0200 id 00014169.4BF30827.000064D5 Received: from 91.54.58.177 (SquirrelMail authenticated user carsten.klein@axn-software.de) by webmail.axn-software.de with HTTP; Tue, 18 May 2010 23:35:35 +0200 (CEST) Message-ID: In-Reply-To: References: Date: Tue, 18 May 2010 23:35:35 +0200 (CEST) Subject: Re: JDBC Driver and timezones From: "Carsten Klein" To: "Thomas Kellerer" Cc: pgsql-jdbc@postgresql.org Reply-To: carsten.klein@axn-software.de User-Agent: SquirrelMail/1.4.15 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.593 tagged_above=-10 required=5 tests=BAYES_50=0.8, RDNS_NONE=0.793 X-Spam-Level: * X-Archive-Number: 201005/47 X-Sequence-Number: 20531 Hi, actually, your application server is not using the system's default timezone, see the configuration of your server. I actually have filed this in the past as either bug or enhancement. Basically the problem lies within the PGSQL JDBC driver, which will use the application server's timezone setting when interpreting the data in the timezone enabled table attributes. In order to overcome this problem, I have adjusted a db layer that we are using in the OSS VerA.Web project so that it will use proxies for the most relevant objects (resultset and so on) that then will just drop the timezone information in the data received from the database, so that when instantiating the datetime object in the application server, it will automatically take over the configured timezone. That way, you will experience no timeshift, whatsoever. See https://evolvis.org/scm/viewvc.php/tags/tarent-database-1.5.4verawebpl3/src/main/java/de/tarent/dblayer/engine/proxy/?root=tarentdatabase for more information. Regards, Carsten -- Carsten Klein Mobil +491 577 666 256 5 carsten.klein@axn-software.de axn software UG (haftungsbeschränkt) Wipperfürther Str. 278, 51515 Kürten Geschäftsführung Carsten Klein HRB 66732, Gerichtsstand Amtsgericht Bergisch Gladbach Steuernr. 204/5740/0835, USt-IdNr. DE 266 540 939 Telefon +492 268 801 285, Telefax +492 268 801 285 www.axn-software.de, info@axn-software.de