BUG #2443: 1 hour error at date calculation - Mailing list pgsql-bugs

From nikolaus klepp
Subject BUG #2443: 1 hour error at date calculation
Date
Msg-id 200605180957.k4I9vxZw019516@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #2443: 1 hour error at date calculation
List pgsql-bugs
The following bug has been logged online:

Bug reference:      2443
Logged by:          nikolaus klepp
Email address:      dr.klepp@gmx.at
PostgreSQL version: 8.0.3, 7.4.8
Operating system:   suse linux 10.0
Description:        1 hour error at date calculation
Details:

i want to calculate the number of days in a month. when I do it this way:

select date_trunc('month', date_trunc('month', date('2006-3-1'))+interval
'1month')-date_trunc('month', date('2006-3-1'));

the result is: 30 days 23:00:00
that is obviously wrong.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #2441: All useable indexes for an IN are used, not just one
Next
From: gsmd@gmx-topmail.de
Date:
Subject: sequences problem