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 E61A63A49EC for ; Fri, 26 Nov 2004 18:17:40 +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 26862-09 for ; Fri, 26 Nov 2004 18:17:38 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 41B543A4AD9 for ; Fri, 26 Nov 2004 18:17:37 +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 iAQIHQfO010153; Fri, 26 Nov 2004 13:17:27 -0500 (EST) To: John R Pierce Cc: deepthi@granwill.com, pgsql-jdbc@postgresql.org Subject: Re: Time conversion across various parts of world In-reply-to: <41A6D74F.2020002@hogranch.com> References: <1101452747.41a6d5cb4bb52@granwill.com> <41A6D74F.2020002@hogranch.com> Comments: In-reply-to John R Pierce message dated "Thu, 25 Nov 2004 23:12:15 -0800" Date: Fri, 26 Nov 2004 13:17:26 -0500 Message-ID: <10152.1101493046@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/212 X-Sequence-Number: 11634 John R Pierce writes: > deepthi@granwill.com wrote: >> How can i convert this time or get the corresponding >> time at US using pgsql time zone feature or if anything else. > store GMT in the database always, convert back to local time when you > display it. Note that the TIMESTAMP WITH TIME ZONE datatype effectively does that for you. The only thing you need to do is SET TIMEZONE to the appropriate timezone for data entry or display. The server's timezone is really entirely irrelevant, except that it sets the initial default value for the TIMEZONE setting. regards, tom lane