Re: BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Douglas <mark(at)steelhousemedia(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH
Date: 2009-09-03 05:24:27
Message-ID: 8377.1251955467@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Mark Douglas <mark(at)steelhousemedia(dot)com> writes:
> I have my timezone set to GMT so there really shouldn't be any time zone adjustments.

Okay ...

postgres=# set timezone = GMT;
SET
postgres=# SELECT DATE_TRUNC('MONTH', CURRENT_DATE);
date_trunc
------------------------
2009-09-01 00:00:00+00
(1 row)

I suspect there's something you're not telling us, like you're
using a client-side library that is doing timezone adjustments
behind your back.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Stehule 2009-09-03 06:31:53 Re: BUG #5032: unexpected syntax error for plpgsql function returns table
Previous Message Mark Douglas 2009-09-03 05:06:03 Re: BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH