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 2A73B52F3A for ; Tue, 26 Jul 2005 00:32:10 -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 75886-10 for ; Tue, 26 Jul 2005 03:32:01 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 320E552F30 for ; Tue, 26 Jul 2005 00:32:01 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DxGAi-0000Iu-5i; Tue, 26 Jul 2005 15:32:00 +1200 Message-ID: <42E5AEAF.2060809@opencloud.com> Date: Tue, 26 Jul 2005 15:31:59 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dave Cramer Cc: "pgsql-jdbc@postgresql.org" Subject: Re: work in progress: timestamp patch References: <42E57D80.4040501@opencloud.com> <42E5ABD8.1080608@opencloud.com> <7E3F468F-93C8-4082-9248-B9B52020E5F9@fastcrypt.com> In-Reply-To: <7E3F468F-93C8-4082-9248-B9B52020E5F9@fastcrypt.com> X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.009 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/312 X-Sequence-Number: 13460 Dave Cramer wrote: > One of the times he is trying to stick in the db is a non-existant time > if it is associated with a > time zone > > stmt.execute("INSERT INTO Foo (t1) VALUES ('2005-04-03 02:29:43.0')"); > > in any US timezone this time does not exist. In US/Mountain timezone this > inserts as 2005-04-03 03:29:43.0' note the hour has incremented from 2 > to 3 What's the underlying column, timestamp or timestamptz? How is the value represented on the Java side? Seems like if you used Timestamp + a UTC calendar on both the set and get paths, it should work fine with no need to mess with the server timezone (assuming untyped parameters)? -O