Skip to content

Commit c93f8f3

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 f93f0b5 commit c93f8f3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc/src/sgml/datetime.sgml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -908,22 +908,22 @@ $ <userinput>cal 9 1752</userinput>
908908
<para>
909909
This definition does, however, provide a way to obtain the astronomical
910910
definition when you need it: do the arithmetic in time
911-
zone <literal>UTC-12</literal>. For example,
911+
zone <literal>UTC+12</literal>. For example,
912912
<programlisting>
913-
=&gt; SELECT extract(julian from '2021-06-23 7:00:00-04'::timestamptz at time zone 'UTC-12');
913+
=&gt; SELECT extract(julian from '2021-06-23 7:00:00-04'::timestamptz at time zone 'UTC+12');
914914
extract
915915
------------------------------
916-
2459389.95833333333333333333
916+
2459388.95833333333333333333
917917
(1 row)
918-
=&gt; SELECT extract(julian from '2021-06-23 8:00:00-04'::timestamptz at time zone 'UTC-12');
918+
=&gt; SELECT extract(julian from '2021-06-23 8:00:00-04'::timestamptz at time zone 'UTC+12');
919919
extract
920920
--------------------------------------
921-
2459390.0000000000000000000000000000
921+
2459389.0000000000000000000000000000
922922
(1 row)
923-
=&gt; SELECT extract(julian from date '2021-06-24');
923+
=&gt; SELECT extract(julian from date '2021-06-23');
924924
extract
925925
---------
926-
2459390
926+
2459389
927927
(1 row)
928928
</programlisting>
929929
</para>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy