April 1 - Mailing list pgsql-general

From Andrew Bartley
Subject April 1
Date
Msg-id 002e01c1c306$db8a2b50$3200a8c0@abartleypc
Whole thread Raw
Responses 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: Jon Hassen
Date:
Subject: index item size 4496 exceeds maximum 2713
Next
From: "montfort"
Date:
Subject: error