Kris Jurka <books(at)ejurka(dot)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
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
In response to
pgsql-jdbc by date
|Next:||From: Kris Jurka||Date: 2004-12-18 06:36:23|
|Subject: Re: Bug in JDBC-Driver? |
|Previous:||From: Kris Jurka||Date: 2004-12-18 05:15:54|
|Subject: Re: Bug in JDBC-Driver?|