From: Tom Lane <tgl@sss.pgh.pa.us>
To: John R Pierce <pierce@hogranch.com>
Cc: deepthi@granwill.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Time conversion across various parts of world
Date: Fri, 26 Nov 2004 13:17:26 -0500
Message-ID: <10152.1101493046@sss.pgh.pa.us> (raw)
In-Reply-To: <41A6D74F.2020002@hogranch.com>
References: <1101452747.41a6d5cb4bb52@granwill.com>
<41A6D74F.2020002@hogranch.com>
John R Pierce <pierce@hogranch.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: tgl@sss.pgh.pa.us, pierce@hogranch.com, deepthi@granwill.com
Subject: Re: Time conversion across various parts of world
In-Reply-To: <10152.1101493046@sss.pgh.pa.us>
References: <1101452747.41a6d5cb4bb52@granwill.com> <41A6D74F.2020002@hogranch.com> <10152.1101493046@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox