pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedtimezone, how postgres deal with it?
3+ messages / 3 participants
[nested] [flat]
* timezone, how postgres deal with it?
@ 2012-11-22 15:36 Anibal David Acosta <aa@devshock.com>
0 siblings, 2 replies; 3+ messages in thread
From: Anibal David Acosta @ 2012-11-22 15:36 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: timezone, how postgres deal with it?
@ 2012-11-22 15:55 Tom Lane <tgl@sss.pgh.pa.us>
parent: Anibal David Acosta <aa@devshock.com>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2012-11-22 15:55 UTC (permalink / raw)
To: Anibal David Acosta <aa@devshock.com>; +Cc: pgsql-admin
"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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: timezone, how postgres deal with it?
@ 2012-11-22 16:05 Albe Laurenz <laurenz.albe@wien.gv.at>
parent: Anibal David Acosta <aa@devshock.com>
1 sibling, 0 replies; 3+ messages in thread
From: Albe Laurenz @ 2012-11-22 16:05 UTC (permalink / raw)
To: Anibal David Acosta *EXTERN* <aa@devshock.com>; pgsql-admin
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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2012-11-22 16:05 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-11-22 15:36 timezone, how postgres deal with it? Anibal David Acosta <aa@devshock.com>
2012-11-22 15:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2012-11-22 16:05 ` Albe Laurenz <laurenz.albe@wien.gv.at>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox