April 1 - Mailing list pgsql-general

From Andrew Bartley
Subject April 1
Date
Msg-id 008101c1c318$b4e34830$3200a8c0@abartleypc
Whole thread Raw
Responses Re: April 1
Re: April 1
List 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

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Clues about tables fileformat
Next
From: Samik Raychauhduri
Date:
Subject: Conditional Statement