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.

Reply via email to