Possible Date-Time Bug???? - Mailing list pgsql-admin

From Andre Schubert
Subject Possible Date-Time Bug????
Date
Msg-id 3BF5060B.3114EC2F@geyer.kabeljournal.de
Whole thread Raw
List pgsql-admin
Hi all,

i think i found a bug in postgresql date/datetime objects.

examples:

select date_trunc('month',date('2002-03-01')+timespan('1
month'))-timespan('24 hours');
returns 2002-03-30 23:00:00+01

select date_trunc('month',date('2002-03-01')+timespan('1
month'))-timespan('23 hours');
returns 2002-03-31 00:00:00+01

select date_trunc('month',date('2001-03-01')+timespan('1
month'))-timespan('24 hours');
returns 2001-03-31 00:00:00+02

select date_trunc('month',date('2001-03-01')+timespan('1
month'))-timespan('23 hours');
returns 2001-03-31 01:00:00+02

PostgreSQL 7.1.2 is on a Linux-Box with Immunix RedHat 6.2.

thanks as

pgsql-admin by date:

Previous
From: Radoslaw Stachowiak
Date:
Subject: strange behaviour of gettimeofday() and pg_dump
Next
From: "Jeff Boes"
Date:
Subject: Upgrading 7.1.2 to .3