Re: BUG #1787: Timestamp issue for moment when clock moved to DST

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #1787: Timestamp issue for moment when clock moved to DST
Дата
Msg-id 3414.1122385851@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #1787: Timestamp issue for moment when clock moved to DST  ("Lumir Vanek" <vanek@idea-envi.cz>)
Список pgsql-bugs
"Lumir Vanek" <vanek@idea-envi.cz> writes:
> CREATE TABLE test_date (start_time timestamp (6) NOT NULL);

> INSERT INTO test_date VALUES(to_timestamp('26.3.2000 01:00:00', 'dd.mm.YYYY
> hh24:mi:ss'));

to_timestamp produces a timestamp with time zone.  Rotating that to a
timestamp without time zone is going to have strange behaviors at DST
boundaries.  You probably really want to be storing timestamp with tz
anyway, given that you think the timestamps represent real time instants
;-)

Alternatively, why bother with to_timestamp at all?  Given an
appropriate DateStyle setting, the native timestamp input data converter
is going to do just fine with this data format.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: krb5 authentication and multihomed server hosts
Следующее
От: pod@herald.ox.ac.uk (pod)
Дата:
Сообщение: Re: krb5 authentication and multihomed server hosts