Re: BUG #12432: date_trunc returning wrong year and day - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #12432: date_trunc returning wrong year and day
Date
Msg-id 20150105202558.GN1457@alvh.no-ip.org
Whole thread Raw
In response to BUG #12432: date_trunc returning wrong year and day  (bquirion@gmail.com)
List pgsql-bugs
bquirion@gmail.com wrote:

> foodb=> select date_trunc('week', now() - interval '1 week');
>        date_trunc
> ------------------------
>  2013-12-30 00:00:00-08
> (1 row)
>
> foodb=> select date_trunc('week', now() - interval '2 week');
>        date_trunc
> ------------------------
>  2014-12-22 00:00:00-08
> (1 row)
>
> I'mn using postgres 8.0.3

8.0.3 was released in 2005.  The latest in the 8.0 branch, 8.0.26 was
released in 2010 containing about 600 commits with bug fixes.  At the
very least you should update to that version and see if it fixes the
problem you have.  In any case you're running a version that has been
out of support for five years now.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-bugs by date:

Previous
From: bquirion@gmail.com
Date:
Subject: BUG #12432: date_trunc returning wrong year and day
Next
From: Tom Lane
Date:
Subject: Re: BUG #12432: date_trunc returning wrong year and day