Re: date_part('timezone_hour')

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jukka Väänänen <jukka(dot)vaananen(at)batman(dot)jypoly(dot)fi>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: date_part('timezone_hour')
Date: 2003-09-16 14:08:24
Message-ID: 16877.1063721304@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?ISO-8859-1?Q?Jukka_V=E4=E4n=E4nen?= <jukka(dot)vaananen(at)batman(dot)jypoly(dot)fi> writes:
> using postgresql 7.3.1:

> # select current_timestamp,date_part('timezone_hour',current_timestamp);
> timestamptz | date_part
> -------------------------------+-----------
> 2003-09-16 10:51:58.228489+03 | -3
> (1 row)

> I would expect date_part('timezone_hour') to return 3. But it returns -3
> instead. Why so?

Because someone got it backwards ;-). We have reversed the sign of this
result for 7.4.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2003-09-16 14:12:01 Re: update field using substrings of another field
Previous Message Dave [Hawk-Systems] 2003-09-16 13:58:25 update field using substrings of another field