Discussion:
timezone, how postgres deal with it?
(too old to reply)
Anibal David Acosta
2012-11-22 15:36:42 UTC
Permalink
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)



But are exactly same time



Why?



timestamp with timezone just show/hide time zone?



thanks
Tom Lane
2012-11-22 15:55:00 UTC
Permalink
Post by Anibal David Acosta
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)
But are exactly same time
No, they aren't. You're apparently still confused about the sign of
timezone offsets. The first one corresponds to 19:00 GMT, the second
to 21:00 GMT.

BTW, why are you posting the exact same question you posted two days
ago on another list?

regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Albe Laurenz
2012-11-22 16:05:49 UTC
Permalink
Post by Anibal David Acosta
This query returns false
select ('2012-11-20 17:00:00-02:00'::timestamp with time zone) =
('2012-11-20 18:00:00-
Post by Anibal David Acosta
03:00'::timestamp with time zone)
But are exactly same time
Why?
They are not the same. Compare:

select ('2012-11-20 17:00:00-02:00'::timestamp with time zone) =
('2012-11-20 16:00:00-03:00'::timestamp with time zone)

That will return true.

Yours,
Laurenz Albe
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Loading...