Thread: date_part('timezone_hour')
hi, 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? -Jukka
=?ISO-8859-1?Q?Jukka_V=E4=E4n=E4nen?= <jukka.vaananen@batman.jypoly.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