How to ensure GMT time zone for Timestamp in PostgreSQL? - Mailing list pgsql-general

From Raymond Chui
Subject How to ensure GMT time zone for Timestamp in PostgreSQL?
Date
Msg-id 3A82C01C.30DD8845@noaa.gov
Whole thread Raw
List pgsql-general
I run PostgreSQL 7.0.3 on my Redhat Linux 6.x

I have to export the system time zone to TZ=EDT.

Then I export PGTZ=GMT

If I insert or update a row in a Timestamp column,
I will get GMT time zone by

select a_timestamp_column from a_table;

2001-02-08 08:30:00+00

But if the PGTZ is not set, then I will get result
2001-02-08 08:30:00-05

Correct?
How do I always get GMT time zone when I select, insert and update?
Should I export PGTZ=GMT before start the PostgreSQL server?

Thank you!


--Raymond


Attachment

pgsql-general by date:

Previous
From: Shahab Asgharzadeh
Date:
Subject: Re: numeric type and odbc from access 2000
Next
From: Mitch Vincent
Date:
Subject: Varchar and indexing..