Re: JDBC Driver and timezones

From: "Carsten Klein" <carsten(dot)klein(at)axn-software(dot)de>
To: "Thomas Kellerer" <spam_eater(at)gmx(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC Driver and timezones
Date: 2010-05-18 21:35:35
Message-ID: e979a6b62190fc12d767b1aa28fb724e.squirrel@webmail.axn-software.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


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(dot)klein(at)axn-software(dot)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(at)axn-software(dot)de

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message harryh 2010-05-18 21:52:17 no timeout in AbstractJdbc23PoolingDataSource#getPooledConnection
Previous Message Thomas Kellerer 2010-05-18 16:55:06 Re: JDBC Driver and timezones