Re: [GENERAL] Are we backwards on the sign of timezones? - Mailing list pgsql-hackers

From Dan Langille
Subject Re: [GENERAL] Are we backwards on the sign of timezones?
Date
Msg-id 3F067B47.16712.71B0D88A@localhost
Whole thread Raw
In response to Re: [GENERAL] Are we backwards on the sign of timezones?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 4 Jul 2003 at 23:22, Tom Lane wrote:

> "Dan Langille" <dan@langille.org> writes:
> > Now that my NZ server is up and running:
> > template1=# select now();
> >  2003-07-05 12:47:15.444535+12
>
> > That doesn't look backwards to me.
>
> Try EXTRACT(timezone_hour from now());
>
> The timestamp I/O routines are using what I think is the correct sign.
> EXTRACT() is at variance.  So is SET TIMEZONE with a numeric offset.

select now(), extract(timezone_hour from now());
              now              | date_part
-------------------------------+-----------
 2003-07-05 23:15:09.760771+12 |       -12

Yep, I'd say that should return +12, not -12.
--
Dan Langille : http://www.langille.org/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Are we backwards on the sign of timezones?
Next
From: Oleg Bartunov
Date:
Subject: Re: How to submit Tsearch V2 ?