Error in date_part epoch docs. - Mailing list pgsql-docs

From Christopher Kings-Lynne
Subject Error in date_part epoch docs.
Date
Msg-id ECEHIKNFIMMECLEBJFIGKEBHCCAA.chriskl@familyhealth.com.au
Whole thread Raw
List 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 by date:

Previous
From: Rene Pijlman
Date:
Subject: Re: PERL + Postgres
Next
From: Thomas Lockhart
Date:
Subject: Re: Error in date_part epoch docs.