Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc93f8f3

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 wayto do this, but upon further review, it's definitely UTC+12.Discussion:https://postgr.es/m/1197050.1619123213@sss.pgh.pa.us
1 parentf93f0b5 commitc93f8f3

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)

[8]ページ先頭

©2009-2025 Movatter.jp