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