| From: | Raymond Chui <raymond(dot)chui(at)noaa(dot)gov> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | How to ensure GMT time zone for Timestamp in PostgreSQL? |
| Date: | 2001-02-08 15:49:48 |
| Message-ID: | 3A82C01C.30DD8845@noaa.gov |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| raymond.chui.vcf | text/x-vcard | 421 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2001-02-08 15:49:54 | Re: Trouble with views (7.1beta4 Debian) and PgAccess 0.98.7. |
| Previous Message | Tom Lane | 2001-02-08 15:41:45 | Re: tuples too big |