Bug 78582 - time zone 'GMT-8' gives weird results
Summary: time zone 'GMT-8' gives weird results
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: postgresql
Version: 7.3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Andrew Overholt
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-25 23:49 UTC by David Kaplan
Modified: 2007-04-18 16:48 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-03-12 23:44:51 UTC
Embargoed:


Attachments (Terms of Use)

Description David Kaplan 2002-11-25 23:49:03 UTC
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):


How reproducible:
Always

Steps to Reproduce:
1.SET TIME ZONE 'GMT-8';
2.SELECT '2002-01-01 00:00-00'::timestamp;
3.
	

Actual Results:        timestamptz       
------------------------
 2002-01-01 08:00:00+08
(1 row)


Expected Results:        timestamptz       
------------------------
 2001-12-31 16:00:00-08
(1 row)


Additional info:

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.

Comment 1 Andrew Overholt 2003-03-04 17:37:04 UTC
Assigning to me.

Comment 2 Andrew Overholt 2003-03-12 23:44:51 UTC
tgl says:

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).


Note You need to log in before you can comment on or make changes to this bug.