Re: to_char function has Daylight Savings Bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: to_char function has Daylight Savings Bug
Дата
Msg-id 10391.1053019573@sss.pgh.pa.us
обсуждение исходный текст
Ответ на to_char function has Daylight Savings Bug  (Dana Burd <DBurd@cpr.org>)
Список pgsql-bugs
Dana Burd <DBurd@cpr.org> writes:
> to_char(timestamp, 'SSSS') has a Daylight Savings bug.  It includes the
> missing 2am hour in it's "seconds from midnight count" for DST begin day
> (4/6/2003), and does not include the extra hour for DST end day
> (10/26/2003).

It's not readily apparent to me that this is a bug.  The SSSS value is
evidently being calculated as HH*3600+MM*60+SS, so it corresponds to the
nominal time of 3:00:00 AM.  I think it would be rather surprising if
SSSS *didn't* correspond to HH:MM:SS.

However, to_char() is intended to slavishly imitate Oracle's to_char(),
warts and all.  What does Oracle do with this situation?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: segfault in postmaster (pg 7.3.2 & FreeBSD)
Следующее
От: Andreas Schmitz
Дата:
Сообщение: UPDATE has a bug to update tables with an index of 2 columns