Re: Understanding TIMESTAMP WITH TIME ZONE - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Understanding TIMESTAMP WITH TIME ZONE
Date
Msg-id 50FC940A.3020607@gmail.com
Whole thread Raw
In response to Re: Understanding TIMESTAMP WITH TIME ZONE  (Robert James <srobertjames@gmail.com>)
Responses Re: Understanding TIMESTAMP WITH TIME ZONE  (François Beausoleil <francois@teksol.info>)
List pgsql-general
On 01/20/2013 04:28 PM, Robert James wrote:
> On 1/18/13, Steve Crawford <scrawford@pinpointresearch.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.klaver@gmail.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Understanding TIMESTAMP WITH TIME ZONE
Next
From: Alejandro Carrillo
Date:
Subject: Re: not(t_xmax = 0)