Обсуждение: timezone, how postgres deal with it?
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
"Anibal David Acosta" <aa@devshock.com> writes:
> 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
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)
>
> 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