Re: storing TZ along timestamps

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: storing TZ along timestamps
Дата
Msg-id BANLkTimRGA59Bwsc4C4tO8RKUODsyMyitw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: storing TZ along timestamps  (Jim Nasby <jim@nasby.net>)
Ответы Re: storing TZ along timestamps
Список pgsql-hackers
On Thu, Jun 2, 2011 at 8:58 PM, Jim Nasby <jim@nasby.net> wrote:
>
> I'm torn between whether the type should store the original time or the original time converted to GMT.

This is the wrong way to think about it. We *never* store time
"converted to GMT".  When we want to represent a point in time we
represent it as seconds since the epoch. This is a quantity that is
the same everywhere in the world (modulo relativistic effects...) ie.
it's a concept which is completely independent of timezones.

The question here is how to represent more complex concepts than
simply points in time. I think the two concepts under discussion are
a) a composite type representing a point in time and a timezone it
should be interpreted in for operations and display and b) the
original input provided which is a text string with the constraint
that it's a valid input which can be interpreted as a point in time.

-- 
greg


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: reducing the overhead of frequent table locks - now, with WIP patch
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: WIP: Fast GiST index build