473,387 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

date_part('timezone_hour')


hi,

using postgresql 7.3.1:

# select current_timestamp,date_part('timezone_hour',curren t_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?

-Jukka

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 11 '05 #1
1 3198
=?ISO-8859-1?Q?Jukka_V=E4=E4n=E4nen?= <ju************@batman.jypoly.fi> writes:
using postgresql 7.3.1: # select current_timestamp,date_part('timezone_hour',curren t_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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.