more timeofday() and "set time zone" weirdness - Mailing list pgsql-general

From jason_priebe@yahoo.com (Jason Priebe)
Subject more timeofday() and "set time zone" weirdness
Date
Msg-id ff375b78.0308130704.27b8c30b@posting.google.com
Whole thread Raw
Responses Re: more timeofday() and "set time zone" weirdness  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I posted earlier with a very complex example.  This simple one
gets to the point much faster.  timeofday() seems to behave
inconsistently when the timezone is set with "GMT+X" notation.

foo=> select cast(timeofday() as timestamp with time zone); set time
zone 'GMT+4'; select cast(timeofday() as timestamp with time zone);
           timeofday
-------------------------------
 2003-08-13 11:01:26.502064-04
(1 row)

SET VARIABLE
           timeofday
-------------------------------
 2003-08-13 07:01:26.503328-04
(1 row)


I am currently 4 hours behind GMT.  The first timestamp reflects
the correct time.  After setting the time zone to "GMT+4", I get
a time value that is 4 hours too early.  If I were to instead
use "America/New_York" for the time zone, I would not have this
problem.  Unfortunately, I cannot use such notation under Cygwin.
BTW -- I am seeing this problem with version 7.2.3 under RH Linux
version 7.3.

Jason Priebe
jason_priebe@yahoo.com

pgsql-general by date:

Previous
From: proghome@silesky.com (krystoffff)
Date:
Subject: Re: The database is very slow !
Next
From: firoz ahamed
Date:
Subject: HLR/HSS