| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера