Re: Re: Problem with Dates

Поиск
Список
Период
Сортировка
От Brett W. McCoy
Тема Re: Re: Problem with Dates
Дата
Msg-id Pine.LNX.4.30.0101242158130.8496-100000@chapelperilous.net
обсуждение исходный текст
Ответ на Re: Problem with Dates  ("Glen and Rosanne Eustace" <agree@godzone.net.nz>)
Список pgsql-sql
On Thu, 25 Jan 2001, Glen and Rosanne Eustace wrote:

> pressie# select '31/12/2000'::date + '1 year'::timespan;
>           ?column?
> -----------------------------
>  01/01/2002 00:00:00.00 NZDT
> (1 row)
>
> pressie=#
>
> Well I do :-(
>
> I vaguely remember someone else having the same problem and it was
> something to do with daylight saving.  I don't recall the solution
> though, if there was one.

It might also have something to do with your timezone.  I did the exact
same query on my server and got the correct result:

cp=> select '31/12/2000'::date + '1 year'::timespan;       ?column?
------------------------2001-12-31 00:00:00-05
(1 row)

cp=>

What happens if instead you add the days?

-- Brett                                    http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
We are what we are.



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

Предыдущее
От: Mike Castle
Дата:
Сообщение: Re: Problem with Dates
Следующее
От: Som
Дата:
Сообщение: Insertion and Retrieval of BLOB