Re: Timestamp with vs without time zone.

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Timestamp with vs without time zone.
Дата
Msg-id 4a195869-f9ed-c39b-4070-e882b546d7fd@aklaver.com
обсуждение исходный текст
Ответ на Re: Re: Timestamp with vs without time zone.  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Ответы Re: Timestamp with vs without time zone.  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список pgsql-general
On 9/21/21 11:45 AM, Peter J. Holzer wrote:
> On 2021-09-21 13:43:46 -0400, Dave Cramer wrote:
>>
>>
>> On Tue, 21 Sept 2021 at 13:40, Peter J. Holzer <hjp-pgsql@hjp.at> wrote:
>>
>>      On 2021-09-21 13:34:21 -0400, Dave Cramer wrote:
>>      > On Tue, 21 Sept 2021 at 13:20, Peter J. Holzer <hjp-pgsql@hjp.at> wrote:
>>      >     On 2021-09-21 20:50:44 +1200, Tim Uckun wrote:
>>      >     Calling a type which doesn't include a timezone
>>      >     "timestamp with timezone" is - how do I put this? - more than just
>>      >     weird.
>>      >
>>      > I would say this is a perspective thing. It's a timestamp with a time
>>      > zone from the client's perspective.
>>
>>      I disagree. When I read back the value the original timezone is lost. So
>>      it clearly DOESN'T store the timestamp WITH the timezone.
>>
>>
>> I never said it stored the timezone.  I said that it has a timezone.
> 
> The raison d’être of a database is to store data. If some data isn't
> stored, the database doesn't have it, in my opinion.
> 

But if you use timestamptz it does have it. The data(timestamp) is 
stored with time zone UTC. From there you can reconstruct the timestamp 
at any time zone you want, given the clients needs. I'm not sure why 
where it started is important when people care how it is presented to 
them on retrieval.


-- 
Adrian Klaver
adrian.klaver@aklaver.com



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

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Timestamp with vs without time zone.
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Timestamp with vs without time zone.