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