@@ -8107,9 +8107,11 @@ SELECT EXTRACT(DOY FROM TIMESTAMP '2001-02-16 20:38:40');
81078107 <listitem>
81088108 <para>
81098109 For <type>timestamp with time zone</type> values, the
8110- number of seconds since 1970-01-01 00:00:00 UTC (can be negative);
8110+ number of seconds since 1970-01-01 00:00:00 UTC (negative for
8111+ timestamps before that);
81118112 for <type>date</type> and <type>timestamp</type> values, the
8112- number of seconds since 1970-01-01 00:00:00 local time;
8113+ nominal number of seconds since 1970-01-01 00:00:00,
8114+ without regard to timezone or daylight-savings rules;
81138115 for <type>interval</type> values, the total number
81148116 of seconds in the interval
81158117 </para>
@@ -8118,18 +8120,29 @@ SELECT EXTRACT(DOY FROM TIMESTAMP '2001-02-16 20:38:40');
81188120SELECT EXTRACT(EPOCH FROM TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40.12-08');
81198121<lineannotation>Result: </lineannotation><computeroutput>982384720.12</computeroutput>
81208122
8123+ SELECT EXTRACT(EPOCH FROM TIMESTAMP '2001-02-16 20:38:40.12');
8124+ <lineannotation>Result: </lineannotation><computeroutput>982355920.12</computeroutput>
8125+
81218126SELECT EXTRACT(EPOCH FROM INTERVAL '5 days 3 hours');
81228127<lineannotation>Result: </lineannotation><computeroutput>442800</computeroutput>
81238128</screen>
81248129
81258130 <para>
8126- You can convert an epoch value back to a timestamp
8131+ You can convert an epoch value back to a<type>timestamp with timezone</type>
81278132 with <function>to_timestamp</function>:
81288133 </para>
81298134<screen>
81308135SELECT to_timestamp(982384720.12);
81318136<lineannotation>Result: </lineannotation><computeroutput>2001-02-17 04:38:40.12+00</computeroutput>
81328137</screen>
8138+
8139+ <para>
8140+ Beware that applying <function>to_timestamp</function> to an epoch
8141+ extracted from a <type>date</type> or <type>timestamp</type> value
8142+ could produce a misleading result: the result will effectively
8143+ assume that the original value had been given in UTC, which might
8144+ not be the case.
8145+ </para>
81338146 </listitem>
81348147 </varlistentry>
81358148