Red Hat Bugzilla – Bug 78582
time zone 'GMT-8' gives weird results
Last modified: 2007-04-18 12:48:42 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020710
Description of problem:
I generally use PST with no daylight savings for my database - this is Greenwich
Mean Time minus 8 hours. In order to do this, I would think one would set
SET TIME ZONE 'GMT-8';
However, this gives the opposite of the desired effect (ie. GMT + 8 hours ).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.SET TIME ZONE 'GMT-8';
2.SELECT '2002-01-01 00:00-00'::timestamp;
Actual Results: timestamptz
Expected Results: timestamptz
Perhaps this is the way it should be, but seems strange to me. Also, I am not
sure if this is a problem with the system wide time zone information, or
particular to postgresql.
Assigning to me.
you can get the same behavior by doing, eg,
[tgl@rh1 tgl]$ TZ='GMT' date
Wed Mar 12 23:23:23 GMT 2003
[tgl@rh1 tgl]$ TZ='GMT+5' date
Wed Mar 12 18:23:32 GMT 2003
It's a glibc thing. Resolving NOTABUG (or at least not a PostgreSQL bug).