Error in date_part epoch docs.

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Error in date_part epoch docs.
Дата
Msg-id ECEHIKNFIMMECLEBJFIGKEBHCCAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Список pgsql-docs
This one had me worried for a while:

From functions-datetime.html...

epoch
For date and timestamp values, the number of seconds since 1970-01-01
00:00:00 (Result may be negative.); for interval values, the total number of
seconds in the interval

This is incorrect, it's from 1970-01-01 08:00:00

eg:

australia=# select date_part('epoch', '1970-01-01 08:00:00'::timestamp);
 date_part
-----------
         0
(1 row)

australia=# select date_part('epoch', '1970-01-01 00:00:00'::timestamp);
 date_part
-----------
    -28800
(1 row)

This is a trivial change so I won't bother submitting a patch...

Chris


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

Предыдущее
От: Rene Pijlman
Дата:
Сообщение: Re: PERL + Postgres
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: Error in date_part epoch docs.