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

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 (view raw or flat)
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

pgsql-jdbc by date

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

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