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 3589152EC6 for ; Tue, 26 Jul 2005 11:10:56 -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 18814-08 for ; Tue, 26 Jul 2005 14:10:55 +0000 (GMT) Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.91]) by svr1.postgresql.org (Postfix) with ESMTP id 696D752EB8 for ; Tue, 26 Jul 2005 11:10:53 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Tue, 26 Jul 2005 09:10:57 -0500 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.2 Date: Tue, 26 Jul 2005 09:10:43 -0500 From: "Kevin Grittner" To: Cc: , , Subject: Re: Timestamp weirdness Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline 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/324 X-Sequence-Number: 13472 This explains why my suggestion would not work -- I was aware that specifying a timezone to a TIMESTAMP WITHOUT TIME ZONE resulted in the time zone being completely ignored -- I assumed that handling of the value string for a timestampz within the protocol would follow the same rules. This also explains why it works correctly when people convert the timestamp into a string with the desired time zone and insert that as a literal in place of the ? within the PreparedStatement. Thanks for the info. I assume that the behavior of the server when receiving a timestampz within the protocol couldn't be changed to match the handling of a literal without breaking significant existing code. -Kevin >>> Oliver Jowett 07/25/05 6:08 PM >>> If the target type is actually timestamp (TIMESTAMP WITHOUT TIME ZONE), the server converts the instant identified by the timestamptz value using the server's TimeZone setting to get a local date/time, and stores that. The string -> timestamp conversion *completely ignores* the supplied timezone, just using the specified date/time directly