postgres.git / summary / log / commit / refs

commit    7bbcfb4d584d0eac4a1f68af09f4e15334236e13
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Wed Apr 28 14:03:28 2021 +0000
First released in: 14.0, 9.6.22, 10.17, 11.12, 12.7, 13.3

    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


doc/src/sgml/datetime.sgml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/src/sgml/datetime.sgml b/doc/src/sgml/datetime.sgml index cb250a63d42..4258bf83af8 100644 --- a/doc/src/sgml/datetime.sgml +++ b/doc/src/sgml/datetime.sgml @@ -908,22 +908,22 @@ $ <userinput>cal 9 1752</userinput> <para> This definition does, however, provide a way to obtain the astronomical definition when you need it: do the arithmetic in time - zone <literal>UTC-12</literal>. For example, + zone <literal>UTC+12</literal>. For example, <programlisting> -=&gt; SELECT extract(julian from '2021-06-23 7:00:00-04'::timestamptz at time zone 'UTC-12'); +=&gt; SELECT extract(julian from '2021-06-23 7:00:00-04'::timestamptz at time zone 'UTC+12'); date_part -------------------- - 2459389.9583333335 + 2459388.9583333335 (1 row) -=&gt; SELECT extract(julian from '2021-06-23 8:00:00-04'::timestamptz at time zone 'UTC-12'); +=&gt; SELECT extract(julian from '2021-06-23 8:00:00-04'::timestamptz at time zone 'UTC+12'); date_part ----------- - 2459390 + 2459389 (1 row) -=&gt; SELECT extract(julian from date '2021-06-24'); +=&gt; SELECT extract(julian from date '2021-06-23'); date_part ----------- - 2459390 + 2459389 (1 row) </programlisting> </para> [parent: a928297bc6f1]