From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | Robert James <srobertjames(at)gmail(dot)com> |
Cc: | Steve Crawford <scrawford(at)pinpointresearch(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Understanding TIMESTAMP WITH TIME ZONE |
Date: | 2013-01-21 01:04:10 |
Message-ID: | 50FC940A.3020607@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 01/20/2013 04:28 PM, Robert James wrote:
> On 1/18/13, Steve Crawford <scrawford(at)pinpointresearch(dot)com> wrote:
>
>
>
> I'm confused. If I make sure to use UTC, isn't timestamp without time
> zone identical, then? If not, what is the difference?
>
>
Realized my previous explanation could be better. The primary difference
is that when you use WITH TIME ZONE Postgres stores the date/time as UTC
and knows it has done so. If you use WITHOUT TIME ZONE it does not. For
purposes of comparison it then makes the assumption the WITHOUT
date/time data is whatever is set for local time. In the situation you
describe above you would need to either set local time at UTC or use AT
TIME ZONE to make the correction.
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Alejandro Carrillo | 2013-01-21 01:36:16 | Re: not(t_xmax = 0) |
Previous Message | Adrian Klaver | 2013-01-21 00:47:37 | Re: Understanding TIMESTAMP WITH TIME ZONE |