BUG #2443: 1 hour error at date calculation

From: "nikolaus klepp" <dr(dot)klepp(at)gmx(dot)at>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2443: 1 hour error at date calculation
Date: 2006-05-18 09:57:59
Message-ID: 200605180957.k4I9vxZw019516@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2443
Logged by: nikolaus klepp
Email address: dr(dot)klepp(at)gmx(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Chana Slutzkin 2006-05-18 12:11:36 Bug in PL/Perl 8.1.3
Previous Message gsmd 2006-05-18 06:05:03 sequences problem