Search Postgresql Archives

AT TIME ZONE and interval arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all

I'm mildly thrown by this:

regress=> SELECT TIME '04:00' AT TIME ZONE '01:00';
  timezone  
-------------
 19:00:00-01
(1 row)

regress=> SELECT TIME '04:00' AT TIME ZONE (INTERVAL '01:00');
  timezone  
-------------
 21:00:00+01
(1 row)

regress=> SELECT TIME '04:00' AT TIME ZONE (TEXT '01:00');
  timezone  
-------------
 19:00:00-01
(1 row)


and was wondering if anyone knows why the sense of the offset is
reversed for typed intervals vs bare literal or text. Is this another
one of the issues caused by the various standards' disagreements about +
vs - time offsets?

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux