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 B3CE03A4635 for ; Fri, 26 Nov 2004 07:12: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 30630-08 for ; Fri, 26 Nov 2004 07:12:37 +0000 (GMT) Received: from hogranch.com (hogranch.com [66.117.128.240]) by svr1.postgresql.org (Postfix) with ESMTP id C52BB3A3B8C for ; Fri, 26 Nov 2004 07:12:33 +0000 (GMT) Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id iAQ7CFV08273; Thu, 25 Nov 2004 23:12:15 -0800 Message-ID: <41A6D74F.2020002@hogranch.com> Date: Thu, 25 Nov 2004 23:12:15 -0800 From: John R Pierce User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: deepthi@granwill.com Cc: pgsql-jdbc@postgresql.org Subject: Re: Time conversion across various parts of world References: <1101452747.41a6d5cb4bb52@granwill.com> In-Reply-To: <1101452747.41a6d5cb4bb52@granwill.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean 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/211 X-Sequence-Number: 11633 deepthi@granwill.com wrote: > Hello, > > For example, our website is running on a server located in Japan and we have > another website #2 running in US. our database is located on the server in > Japan. when some one accesses our website #2 which is located in US, the time > at which the user accessed our website #2 has to be registered in a database > which is situated in Japan. but at present i am getting the system time of the > server which is in japan. How can i convert this time or get the corresponding > time at US using pgsql time zone feature or if anything else. > > Please note: Our other website#2 can be located in other parts of the world > also, it need not be US only. I have the country name where our website#2 is > located and by using this name i need to get the time in that country. store GMT in the database always, convert back to local time when you display it.