BUG #12432: date_trunc returning wrong year and day

From: bquirion(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #12432: date_trunc returning wrong year and day
Date: 2015-01-05 19:17:03
Message-ID: 20150105191703.11501.36985@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 12432
Logged by: Brian Quirion
Email address: bquirion(at)gmail(dot)com
PostgreSQL version: Unsupported/Unknown
Operating system: Linux
Description:

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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2015-01-05 20:25:58 Re: BUG #12432: date_trunc returning wrong year and day
Previous Message Tom Lane 2015-01-05 17:45:05 Re: BUG #12428: Incorrect Code