extract(timezone_hour) problem

Поиск
Список
Период
Сортировка
От Key88 SF
Тема extract(timezone_hour) problem
Дата
Msg-id F1630dU2Yrh8H2cRXzN00022dcc@hotmail.com
обсуждение исходный текст
Список pgsql-hackers
I understand that internally, Postgres converts timestamps to a GMT format 
and then redisplays them in the local timezone. cf: 
http://groups.google.com/groups?selm=Pine.LNX.4.30.0110100104320.672-100000%40peter.localdomain&oe=UTF-8&output=gplain

However --> doesn't this make the extract(timezone_hour...) function 
basically useless? May as well call it "get_local_timezone_hour". How can 
one extract the timezone offset of a timestamp w/timezone (ie. get the 
intended behaviour of the extract call) ???

blackcherry=# SELECT extract(timezone_hour from TIMESTAMP WITH TIME ZONE 
'2001-02-16 20:38:40-05');
date_part
-----------        8
(1 row)

blackcherry=# SELECT extract(timezone_hour from TIMESTAMP WITH TIME ZONE 
'2001-02-16 20:38:40-00');
date_part
-----------        8
(1 row)



-Dave



_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jon Jensen
Дата:
Сообщение: Re: Changing behavior of BEGIN...sleep...do something...COMMIT
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: PostgreSQL and SOAP, version 7.4/8.0