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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH
Дата
Msg-id 8377.1251955467@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH  ("Mark Douglas" <mark@steelhousemedia.com>)
Ответы Re: BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH  (Mark Douglas <mark@steelhousemedia.com>)
Список pgsql-bugs
Mark Douglas <mark@steelhousemedia.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5031: DATE_TRUNC returns the wrong value when specifying MONTH
Следующее
От: Keith Cascio
Дата:
Сообщение: Re: BUG #5032: unexpected syntax error for plpgsql function returns table