Re: date_part returns wrong day for 1974-04-28

Поиск
Список
Период
Сортировка
От Phil Steinke
Тема Re: date_part returns wrong day for 1974-04-28
Дата
Msg-id 20010409183017.B5312@clarkhall.ca
обсуждение исходный текст
Ответ на Re: date_part returns wrong day for 1974-04-28  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список pgsql-bugs
* Thomas Lockhart was mumbling about..
> You are likely running across a "known feature" in PostgreSQL for
> versions before the almost-here v7.1. I do not know which time zone you
> are running in (need that info!) but in the US Pacific Time Zone

Aha..  I'm in Eastern (Canada), and doing this for any switch from EST to
EDT causes the problem.. e.g. April 1st of this year:

=> select timestamp(date('2001-04-01'));
       timestamp
------------------------
 2001-03-31 23:00:00-05
(1 row)

This skewed timestamp then gives the wrong day for the date_part.  I think
that time switches in EST/EDT are supposed to happen at 2am, not midnight,
to help avoid this kind of thing.

Phil

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

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: date_part returns wrong day for 1974-04-28
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Loss of significant digits on pg_dump