Re: Are we backwards on the sign of timezones?

From: "Dan Langille" <dan(at)langille(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org, pgsql-general(at)postgreSQL(dot)org
Subject: Re: Are we backwards on the sign of timezones?
Date: 2003-07-05 11:16:23
Message-ID: 3F067B47.16712.71B0D88A@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 4 Jul 2003 at 23:22, Tom Lane wrote:

> "Dan Langille" <dan(at)langille(dot)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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message peter pilsl 2003-07-05 14:46:47 problem with regexp (cant quote +)
Previous Message adivi 2003-07-05 08:53:01 PostGreSql equivalents to mssql

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2003-07-05 15:00:39 vacuum does not reclaim rows
Previous Message Oleg Bartunov 2003-07-05 10:53:49 Re: How to submit Tsearch V2 ?