Error in date_part epoch docs.

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: <pgsql-docs(at)postgresql(dot)org>
Subject: Error in date_part epoch docs.
Date: 2001-09-25 02:58:37
Message-ID: ECEHIKNFIMMECLEBJFIGKEBHCCAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Thomas Lockhart 2001-09-25 05:41:00 Re: Error in date_part epoch docs.
Previous Message Rene Pijlman 2001-09-24 09:19:42 Re: PERL + Postgres