mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	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
This commit is contained in:
		@@ -930,22 +930,22 @@ $ <userinput>cal 9 1752</userinput>
 | 
				
			|||||||
  <para>
 | 
					  <para>
 | 
				
			||||||
   This definition does, however, provide a way to obtain the astronomical
 | 
					   This definition does, however, provide a way to obtain the astronomical
 | 
				
			||||||
   definition when you need it: do the arithmetic in time
 | 
					   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>
 | 
					<programlisting>
 | 
				
			||||||
=> 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
 | 
					     date_part
 | 
				
			||||||
--------------------
 | 
					--------------------
 | 
				
			||||||
 2459389.9583333335
 | 
					 2459388.9583333335
 | 
				
			||||||
(1 row)
 | 
					(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
 | 
					 date_part
 | 
				
			||||||
-----------
 | 
					-----------
 | 
				
			||||||
   2459390
 | 
					   2459389
 | 
				
			||||||
(1 row)
 | 
					(1 row)
 | 
				
			||||||
=> SELECT extract(julian from date '2021-06-24');
 | 
					=> SELECT extract(julian from date '2021-06-23');
 | 
				
			||||||
 date_part
 | 
					 date_part
 | 
				
			||||||
-----------
 | 
					-----------
 | 
				
			||||||
   2459390
 | 
					   2459389
 | 
				
			||||||
(1 row)
 | 
					(1 row)
 | 
				
			||||||
</programlisting>
 | 
					</programlisting>
 | 
				
			||||||
  </para>
 | 
					  </para>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user