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