Re: now() AT TIME ZONE interval '-5 hours' returns type interval???

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Joshua Moore-Oliva <josh(at)chatgris(dot)com>
Cc: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: now() AT TIME ZONE interval '-5 hours' returns type interval???
Date: 2003-03-14 16:39:16
Message-ID: 20030314163918.0A5CD103D0@polaris.pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday 13 March 2003 8:10 pm, Tom Lane wrote:
> UPDATE pg_proc SET prorettype = 1114 WHERE prosrc = 'timestamptz_izone';

This syntax looked useful to me so I tried the update you suggested
(fortunately on an old test system running 7.2.3) and now it only returns
2000-01-01 00:00:00. Always.

steve=# select now() at time zone interval '6 hours';
timezone
---------------------
2000-01-01 00:00:00
(1 row)

steve=# select now() at time zone interval '-5 hours';
timezone
---------------------
2000-01-01 00:00:00
(1 row)

steve=# select now() at time zone interval '4.5 hours';
timezone
---------------------
2000-01-01 00:00:00
(1 row)

steve=# select now() at time zone interval '0';
timezone
---------------------
2000-01-01 00:00:00
(1 row)

Cheers,
Steve

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2003-03-14 16:41:29 Re: No aswer WAS: Droping a database even if someone is
Previous Message Doug McNaught 2003-03-14 16:37:30 Re: Pg_hba not using local setting