Re: timestamp/date bug

Поиск
Список
Период
Сортировка
От Nabil Sayegh
Тема Re: timestamp/date bug
Дата
Msg-id 3A7ED715.EE289344@sayegh.de
обсуждение исходный текст
Ответ на timestamp/date bug  (juan@netsoc.tcd.ie (Juan Flynn))
Список pgsql-bugs
Juan Flynn wrote:

> SELECT to_char(timestamp '23-Mar-2000' + 3, 'Mon DD');
>  to_char
> ---------
>  Mar 25
> (1 row)
>
> Which is wrong, however:

Dates are interpreted "at a special time" (midnight).
Mar 25 is most likely a daylightsaving day for your timezone.

Just add some hours to the result and you're fine.
(In your example substitute 3 with timespan("3 days 4 hours"))
or something like that.
AFAIK this has been fixed in 7.1

--
 Nabil Sayegh
 GPG-Key available at http://www.sayegh.de
 (see http://www.gnupg.org for details)

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

Предыдущее
От: Karel Zak
Дата:
Сообщение: Re: timestamp/date bug
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PROC struct