Re: Understanding TIMESTAMP WITH TIME ZONE

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Understanding TIMESTAMP WITH TIME ZONE
Дата
Msg-id 50FC940A.3020607@gmail.com
обсуждение исходный текст
Ответ на Re: Understanding TIMESTAMP WITH TIME ZONE  (Robert James <srobertjames@gmail.com>)
Ответы Re: Understanding TIMESTAMP WITH TIME ZONE  (François Beausoleil <francois@teksol.info>)
Список 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 по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Understanding TIMESTAMP WITH TIME ZONE
Следующее
От: Alejandro Carrillo
Дата:
Сообщение: Re: not(t_xmax = 0)