Re: Time Zone Query - Mailing list pgsql-general

From Blake Crosby
Subject Re: Time Zone Query
Date
Msg-id 5.0.2.1.2.20010105140727.01a4a2a8@home.samurai.com
Whole thread Raw
In response to Re: Time Zone Query  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
At 12:09 PM 4/01/2001 -0500, you wrote:
>No, the times in the database are all GMT.  They will get *displayed*
>with some particular timezone offset, as determined by the TIMEZONE
>SET variable.
>
>You have to set TIMEZONE to your local timezone if you want dates
>displayed in something other than the server's default timezone.
>Perhaps what you are really looking for is the PGTZ environment
>variable.  If you keep PGTZ set in your environment, libpq will issue
>the SET TIMEZONE command for you during connection startup.
>
>                         regards, tom lane


After further investigation it turns out I am looking for a timestamp and
timetz hybrid. Possibly timestamptz ? :)

My solution has been to store the timezone offset in a int4 field, then
apply that offset when selecting data from my timestamp type fields.

Regards,
Blake Crosby


pgsql-general by date:

Previous
From: "Gregory Wood"
Date:
Subject: Re: Test for existence of Table
Next
From: Lincoln Yeoh
Date:
Subject: Synchronous LISTEN/NOTIFY?