By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,852 Members | 2,200 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,852 IT Pros & Developers. It's quick & easy.

date_part('timezone_hour')

P: n/a

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
Share this Question
Share on Google+
1 Reply


P: n/a
=?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 discussion thread is closed

Replies have been disabled for this discussion.