From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: JDBC Driver and timezones
Date: Wed, 19 May 2010 08:43:40 +0200
Message-ID: <ht01ae$9oq$1@dough.gmane.org> (raw)
In-Reply-To: <hsvvp4$4lq$1@dough.gmane.org>
References: <hstmm1$96v$1@dough.gmane.org>
<e979a6b62190fc12d767b1aa28fb724e.squirrel@webmail.axn-software.de>
<hsv2np$qhq$1@dough.gmane.org>
<4BF32A15.8010502@opencloud.com>
<hsvvp4$4lq$1@dough.gmane.org>
Thomas Kellerer, 19.05.2010 08:17:
>>> And for the test case the client application _and_ Postgres were
>>> running on the same physical machine. So the JVM (and thus the JDBC
>>> driver) and Postgres should use the same timezone information from my
>>> Windows.
>>
>> The JVM has its own separate timezone database. It does not use the
>> OS-provided timezone data in general.
>>
>
> Yes that's what I assume as well. But I'm still surprised the JVM
> doesn't apply the DST settings correctly (the timezone *is* correct)
>
Hmm, I just tested this and apparently my assumption is wrong (Java *is* using the correct DST setting)
When I run:
System.out.println("DST active: " + TimeZone.getDefault().useDaylightTime());
System.out.println("DST delta: " + TimeZone.getDefault().getDSTSavings());
it correctly shows me that the JDK knows that DST is active and that it should add one hour
(without setting a timezone when starting the JVM)
So either that information is not used by the JDK, or there is something going on in the driver.
Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: spam_eater@gmx.net
Subject: Re: JDBC Driver and timezones
In-Reply-To: <ht01ae$9oq$1@dough.gmane.org>
References: <hstmm1$96v$1@dough.gmane.org> <e979a6b62190fc12d767b1aa28fb724e.squirrel@webmail.axn-software.de> <hsv2np$qhq$1@dough.gmane.org> <4BF32A15.8010502@opencloud.com> <hsvvp4$4lq$1@dough.gmane.org> <ht01ae$9oq$1@dough.gmane.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox