From 7cd542023056b1bb2d6b14313f49fd91db1dcca7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 28 Apr 2021 10:03:28 -0400 Subject: [PATCH] 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 b543f64b65..b2f29e6228 100644 --- a/doc/src/sgml/datetime.sgml +++ b/doc/src/sgml/datetime.sgml @@ -930,22 +930,22 @@ $ cal 9 1752 This definition does, however, provide a way to obtain the astronomical definition when you need it: do the arithmetic in time - zone UTC-12. For example, + zone UTC+12. For example, -=> SELECT extract(julian from '2021-06-23 7:00:00-04'::timestamptz at time zone 'UTC-12'); +=> 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) -=> SELECT extract(julian from '2021-06-23 8:00:00-04'::timestamptz at time zone 'UTC-12'); +=> SELECT extract(julian from '2021-06-23 8:00:00-04'::timestamptz at time zone 'UTC+12'); date_part ----------- - 2459390 + 2459389 (1 row) -=> SELECT extract(julian from date '2021-06-24'); +=> SELECT extract(julian from date '2021-06-23'); date_part ----------- - 2459390 + 2459389 (1 row)