Re: database design with timestamp - Mailing list pgsql-general

From Tom Lane
Subject Re: database design with timestamp
Date
Msg-id 23399.1036692733@sss.pgh.pa.us
Whole thread Raw
In response to Re: database design with timestamp  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-general
Bruno Wolff III <bruno@wolff.to> writes:
> On Tue, Nov 05, 2002 at 20:03:37 +0000,
>   TJ <tj@nospam.com> wrote:
>> I think I need to somehow display these timestamps back into their timezone
>> of origin...so as to be more intuitive for the managers.

> You can use SET TIME ZONE in a session to change the time zone used for
> outputting time.

BTW, a lot of people don't realize at first that PG's notion of
timekeeping is similar to the Unix model: it's all UTC under the hood,
and timezones are just syntactic sugar for input and output.

IMHO this makes it a lot easier to do databases that will be used by
people in multiple timezones: the stored data is really UTC, but each
person can enter times in his own zone, and will see times displayed
in his own zone (where "your own zone" means "whatever you've currently
got TimeZone set to").

            regards, tom lane

pgsql-general by date:

Previous
From: snpe
Date:
Subject: Re: [HACKERS] Database replication... - Mission Critica
Next
From: Bruce Momjian
Date:
Subject: Re: PostgreSQL on Linux and Solaris comparison