Re: Timezone database changes

Поиск
Список
Период
Сортировка
От Magne Mæhre
Тема Re: Timezone database changes
Дата
Msg-id 470E1421.9090709@sun.com
обсуждение исходный текст
Ответ на Re: Timezone database changes  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Timezone database changes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:

> As an example, timestamptz '2007-01-01 00:00 -05' + interval '6 months'
> must yield 2007-07-01 00:00 -05 according to the spec, AFAICS; but most
> people living in the EST5EDT zone would prefer to get midnight -04.
> There are probably some folk in South America who'd prefer midnight
> -06.  (Looks at a map ... hm, maybe not, but certainly Europe vs
> Africa would produce some such examples.)

Correct me if I'm wrong, but IIRC there is no universally accepted 
canonical list of time zone names (labels).  By using the name, instead
of the offset, you are not guaranteed that one database client can even 
understand the timestamp entered by another client (unless the database
contains its own definition which is backed up and restored together 
with the data).

I clearly understand the problems (having written calendar applications 
myself) of not relating the time to the specific time zone, but I think
not adhering to the standard is much worse.  If you're only interested 
in one time zone, simply use WITHOUT TIME ZONE, and you're good.  if 
you're working in multiple time zones, the arithmetic and handling will
be complex (and maybe not even deterministic).

I think the resolution and presentation of local time is best handled by 
an application level, and not by the database.

--Magne


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

Предыдущее
От: Magne Mæhre
Дата:
Сообщение: Re: Timezone database changes
Следующее
От: "Trevor Talbot"
Дата:
Сообщение: Re: Timezone database changes