Re: Getting number of days in a month

Поиск
Список
Период
Сортировка
От Patrick Welche
Тема Re: Getting number of days in a month
Дата
Msg-id 20000413102617.B11677@quartz.newn.cam.ac.uk
обсуждение исходный текст
Ответ на Re: Getting number of days in a month  (Guillaume Perréal <perreal@lyon.cemagref.fr>)
Ответы Re: Getting number of days in a month  ("Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>)
Список pgsql-general
On Thu, Apr 13, 2000 at 09:24:36AM +0200, Guillaume Perréal wrote:
>
> Thanks, I rewrote my function to solve my problem.
>
> In fact, the problem is that ('2000-10-01'::datetime + '1 month'::interval)
> gives '2000-10-31' instead of '2000-11-01'.
> I think it's a bug, isn't it?

It's our old friend daylight savings changeover:

rfb=# select ('2000-10-01'::datetime + '1 month'::interval);
        ?column?
------------------------
 2000-10-31 23:00:00+00
(1 row)
            ^^

1 hour less because going from summer -> winter (For me BST->GMT)

Cheers,

Patrick

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

Предыдущее
От: "omid omoomi"
Дата:
Сообщение: Re: PHP-Postgres link
Следующее
От: Michael Sobolev
Дата:
Сообщение: Character encodings...