Re: timezone, how postgres deal with it? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: timezone, how postgres deal with it?
Date
Msg-id 50AC0203.4010604@gmail.com
Whole thread Raw
In response to timezone, how postgres deal with it?  ("Anibal David Acosta" <aa@devshock.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: timezone, how postgres deal with it?
Next
From: Adrian Klaver
Date:
Subject: Re: get column name passed to a function