Re: Timestamp with vs without time zone.

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Timestamp with vs without time zone.
Дата
Msg-id 2b5872f2-502d-369f-3dd6-1f7907883bfc@aklaver.com
обсуждение исходный текст
Ответ на Timestamp with vs without time zone.  (Tim Uckun <timuckun@gmail.com>)
Ответы Re: Timestamp with vs without time zone.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 9/20/21 11:00 PM, Tim Uckun wrote:
> I am hoping to get some clarification on timestamp with time zone.
> 
> My understanding is that timestamp with time zone stores data in UTC
> but displays it in your time zone.  Does this also work on queries? If
> I query between noon and 2:00 PM on some date in time zone XYZ does pg
> translate the query to UTC before sending it to the server?
> 

> So does the database know the timestamp is in auckland time when the
> client is connecting from a server on UTC?

My question would be why does it matter? The whole purpose of 
timestamptz is that you know it is stored as UTC, from there you can 
transform to whatever time zone you want.



-- 
Adrian Klaver
adrian.klaver@aklaver.com



В списке pgsql-general по дате отправления:

Предыдущее
От: Ninad Shah
Дата:
Сообщение: Re: Question about behavior of conditional indexes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Timestamp with vs without time zone.