Skip to content

Commit f6171e6

Browse files
committed
Doc: fix discussion of how to get real Julian Dates.
Somehow I'd convinced myself that rotating to UTC-12 was the way to do this, but upon further review, it's definitely UTC+12. Discussion: https://postgr.es/m/1197050.1619123213@sss.pgh.pa.us
1 parent 0d05a3a commit f6171e6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc/src/sgml/datetime.sgml

+7-7
Original file line numberDiff line numberDiff line change
@@ -930,22 +930,22 @@ $ <userinput>cal 9 1752</userinput>
930930
<para>
931931
This definition does, however, provide a way to obtain the astronomical
932932
definition when you need it: do the arithmetic in time
933-
zone <literal>UTC-12</literal>. For example,
933+
zone <literal>UTC+12</literal>. For example,
934934
<programlisting>
935-
=&gt; SELECT extract(julian from '2021-06-23 7:00:00-04'::timestamptz at time zone 'UTC-12');
935+
=&gt; SELECT extract(julian from '2021-06-23 7:00:00-04'::timestamptz at time zone 'UTC+12');
936936
date_part
937937
--------------------
938-
2459389.9583333335
938+
2459388.9583333335
939939
(1 row)
940-
=&gt; SELECT extract(julian from '2021-06-23 8:00:00-04'::timestamptz at time zone 'UTC-12');
940+
=&gt; SELECT extract(julian from '2021-06-23 8:00:00-04'::timestamptz at time zone 'UTC+12');
941941
date_part
942942
-----------
943-
2459390
943+
2459389
944944
(1 row)
945-
=&gt; SELECT extract(julian from date '2021-06-24');
945+
=&gt; SELECT extract(julian from date '2021-06-23');
946946
date_part
947947
-----------
948-
2459390
948+
2459389
949949
(1 row)
950950
</programlisting>
951951
</para>

0 commit comments

Comments
 (0)