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 467DE52ABB for ; Wed, 20 Jul 2005 17:14:13 -0300 (ADT) 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 55748-01 for ; Wed, 20 Jul 2005 20:14:12 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 84F7452AB1 for ; Wed, 20 Jul 2005 17:14:09 -0300 (ADT) Received: (qmail 30384 invoked from network); 20 Jul 2005 20:14:11 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 20 Jul 2005 20:14:11 -0000 In-Reply-To: References: <90876a9e05071810503606d431@mail.gmail.com> <42DCF0C9.4030501@opencloud.com> <23396.1121781259@sss.pgh.pa.us> <392278AB-987F-40CF-B59D-DDF53B9A4ACF@fastcrypt.com> <90876a9e050719093261c52c64@mail.gmail.com> <42DDF238.8090601@opencloud.com> <24020.1121881295@sss.pgh.pa.us> <90876a9e05072010475d161b94@mail.gmail.com> <42DEA450.5070606@hogranch.com> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <083AF7E3-A6DC-4BF1-BA72-B1B80537FB1E@fastcrypt.com> Cc: John R Pierce , Christian Cryder , Tom Lane , Oliver Jowett , pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: Timestamp Conversion Woes Redux Date: Wed, 20 Jul 2005 16:14:09 -0400 To: Kris Jurka X-Mailer: Apple Mail (2.733) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.016 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/197 X-Sequence-Number: 13345 I think using the same time zone as the server is the only way to go: Kris has proposed a patch which would set the servers time zone to the JVM when the connection is started This can still be broken if someone were to change the default timezone after the connection was initiated. If we do the reverse and save the servers timezone for the purposes of creating the timestamp object we don't run into this problem, even if someone were to issue a set timezone='newtimezone' we will still get the notice and can update the stored server timezone for the connection. Dave On 20-Jul-05, at 3:50 PM, Kris Jurka wrote: > > > On Wed, 20 Jul 2005, John R Pierce wrote: > > >> as we discovered the hard way, named timezones are a BAD IDEA. >> We had some >> stuff in java + jdbc + postgres that used a timezone, when it was >> brought up in >> Singapore, their local timezone memnonic wasn't recognized by >> postgres, and >> when it was brought up in China, CST was misinterpretted as >> Central Standard >> Time rather than China Standard Time (about 12 hours off) >> >> > > No, this indicates that *abbreviated* timezones are a bad idea, not > named > timezones. > > Kris Jurka > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > >