From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kris Jurka <books@ejurka.com>
Cc: Antje.Stejskal@ppi.de
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Bug in JDBC-Driver?
Date: Sat, 18 Dec 2004 01:21:31 -0500
Message-ID: <28459.1103350891@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.BSO.4.56.0412172356480.15005@leary.csoft.net>
References: <6D48B8403D926449BDE8440EC7EEC46D021F2026@max.ppinet.de>
<Pine.BSO.4.56.0411300213500.5924@leary.csoft.net>
<Pine.BSO.4.56.0412172356480.15005@leary.csoft.net>
Kris Jurka <books@ejurka.com> writes:
> The second approach forces the server timezone to be the JVM's via the
> pseudo sql/java:
> SET TIMEZONE = java.util.TimeZone.getDefault().getID();
> This is a little more intrusive on the server side, but it should not be
> visible using standard JDBC calls for date and time information. The
> attached patch implements this and I plan to apply it unless someone has a
> better idea or a reason it won't work.
The really serious problem with this is the assumption that the server
has the same set of available timezones (and spellings of same) as the
client does.
I'm not sure that there is a better alternative, mind you. Just
pointing out that the emperor doesn't really have any clothes on.
In 8.0 and later you can presume that the server is following the
zic database's set of timezone names, but I dunno whether that has
anything to do with the Java universe. Pre-8.0, you'd be foolish
to assume much of anything.
It's not quite too late to make TimeZone be one of the GUC_REPORT
settings in 8.0, if that would help your problem.
regards, tom lane
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: tgl@sss.pgh.pa.us, books@ejurka.com, Antje.Stejskal@ppi.de
Subject: Re: Bug in JDBC-Driver?
In-Reply-To: <28459.1103350891@sss.pgh.pa.us>
References: <6D48B8403D926449BDE8440EC7EEC46D021F2026@max.ppinet.de> <Pine.BSO.4.56.0411300213500.5924@leary.csoft.net> <Pine.BSO.4.56.0412172356480.15005@leary.csoft.net> <28459.1103350891@sss.pgh.pa.us>
* 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