April 1

From: "Andrew Bartley" <abartley(at)evolvosystems(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: April 1
Date: 2002-03-03 22:57:56
Message-ID: 002e01c1c306$db8a2b50$3200a8c0@abartleypc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi

I'm having trouble calculating a date of April 1 2002.

Postgres 7.1.3 Linux 2.4.14

select date(date('2002-03-30') + interval('1 day'))

result 2002-03-31

select date(date('2002-03-31') + interval('1 day'))

result 2002-03-31

It seems as though the "+ interval('1 day'))" only adds 23 hours rather than 24.

So adding "interval( '1 day')" to the march 31 returns march 31.

It may have something to do with day light savings.

Can any one suggest a work around?

Is this a bug?

Thanks

Andrew Bartley

Responses

  • Re: April 1 at 2002-03-07 22:32:25 from Martijn van Oosterhout

Browse pgsql-general by date

  From Date Subject
Next Message Miguel A. Arévalo 2002-03-04 00:12:57 Re: Clues about tables fileformat
Previous Message Tim Finch, FosterFinch Ltd 2002-03-03 22:35:17 PGSTAT Error from Postmaster