Re: timezone, how postgres deal with it?

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: timezone, how postgres deal with it?
Дата
Msg-id 50AC0203.4010604@gmail.com
обсуждение исходный текст
Ответ на timezone, how postgres deal with it?  ("Anibal David Acosta" <aa@devshock.com>)
Список pgsql-general
On 11/20/2012 01:48 PM, Anibal David Acosta wrote:
> This query returns false
>
> select ('2012-11-20 17:00:00-02:00'::timestamp with time zone) =
> ('2012-11-20 18:00:00-03:00'::timestamp with time zone)
>
> Why?
>
> Does postgres convert the datetime or just show/hide time zone?
>

Try:
test=> select ('2012-11-20 17:00:00+02:00'::timestamp with time zone) = ('2012-11-20 18:00:00+03:00'::timestamp with
timezone); 
 ?column?
----------
 t
(1 row)

For explanation see:

http://www.postgresql.org/docs/9.2/interactive/datatype-datetime.html#DATATYPE-TIMEZONES


--
Adrian Klaver
adrian.klaver@gmail.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: timezone, how postgres deal with it?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: get column name passed to a function