X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 84E523CC3F9 for ; Sat, 18 Dec 2004 06:21:36 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 45435-10 for ; Sat, 18 Dec 2004 06:21:32 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id EDF543CC174 for ; Sat, 18 Dec 2004 06:21:32 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id iBI6LVnB028460; Sat, 18 Dec 2004 01:21:31 -0500 (EST) To: Kris Jurka Cc: Antje.Stejskal@ppi.de, pgsql-jdbc@postgresql.org Subject: Re: Bug in JDBC-Driver? In-reply-to: References: <6D48B8403D926449BDE8440EC7EEC46D021F2026@max.ppinet.de> Comments: In-reply-to Kris Jurka message dated "Sat, 18 Dec 2004 00:15:54 -0500" Date: Sat, 18 Dec 2004 01:21:31 -0500 Message-ID: <28459.1103350891@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/139 X-Sequence-Number: 11805 Kris Jurka 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