Search Postgresql Archives

Re: timezone, how postgres deal with it?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 time zone);
 ?column? 
----------
 t
(1 row)

For explanation see:

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


-- 
Adrian Klaver
adrian.klaver@xxxxxxxxx


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux