git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f93f0b5)
Doc: fix discussion of how to get real Julian Dates.
2021年4月28日 14:03:28 +0000 (10:03 -0400)
2021年4月28日 14:03:28 +0000 (10:03 -0400)
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


diff --git a/doc/src/sgml/datetime.sgml b/doc/src/sgml/datetime.sgml
index 2e48d5d788580a9266c84350e5a73e18f6e3ebc3..c53bd2f379f4f50487a2bfdc397d66f4f93276a3 100644 (file)
--- 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');
extract
------------------------------
- 2459389.95833333333333333333
+ 2459388.95833333333333333333
(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');
extract
--------------------------------------
- 2459390.0000000000000000000000000000
+ 2459389.0000000000000000000000000000
(1 row)
-=&gt; SELECT extract(julian from date '2021年06月2日4');
+=&gt; SELECT extract(julian from date '2021年06月2日3');
extract
---------
- 2459390
+ 2459389
(1 row)
</programlisting>
</para>
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /