mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Clarify input/output timezone information.
Add detail on exact interpretation of "concatenated date" for various lengths.
This commit is contained in:
parent
b32ffb7345
commit
f8a9892daf
@ -1,8 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.3 1999/05/26 17:30:28 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/datetime.sgml,v 2.4 1999/06/23 06:17:51 thomas Exp $
|
||||||
Date/time details
|
Date/time details
|
||||||
|
|
||||||
$Log: datetime.sgml,v $
|
$Log: datetime.sgml,v $
|
||||||
|
Revision 2.4 1999/06/23 06:17:51 thomas
|
||||||
|
Clarify input/output timezone information.
|
||||||
|
Add detail on exact interpretation of "concatenated date"
|
||||||
|
for various lengths.
|
||||||
|
|
||||||
Revision 2.3 1999/05/26 17:30:28 thomas
|
Revision 2.3 1999/05/26 17:30:28 thomas
|
||||||
Add chapters on CVS access, MVCC, SQL theory to the docs.
|
Add chapters on CVS access, MVCC, SQL theory to the docs.
|
||||||
Add an appendix with more details on date/time attributes and handling.
|
Add an appendix with more details on date/time attributes and handling.
|
||||||
@ -23,6 +28,12 @@ Finish initial markup of cvs.sgml, and include it in the programmer's guide
|
|||||||
<title>Time Zones</title>
|
<title>Time Zones</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
<productname>Postgres</productname> must have internal tabular
|
||||||
|
information for time zone decoding, since there is no *nix standard
|
||||||
|
system interface to provide access to general, cross-timezone
|
||||||
|
information. The underlying OS <emphasis>is</emphasis> used to
|
||||||
|
provide time zone information for <emphasis>output</emphasis>.
|
||||||
|
|
||||||
<table tocentry="1">
|
<table tocentry="1">
|
||||||
<title><productname>Postgres</productname> Recognized Time Zones</title>
|
<title><productname>Postgres</productname> Recognized Time Zones</title>
|
||||||
<titleabbrev>Time Zones</titleabbrev>
|
<titleabbrev>Time Zones</titleabbrev>
|
||||||
@ -504,9 +515,6 @@ Finish initial markup of cvs.sgml, and include it in the programmer's guide
|
|||||||
<step>
|
<step>
|
||||||
<para>
|
<para>
|
||||||
The token is a number or number field.
|
The token is a number or number field.
|
||||||
If there are more than 4 digits,
|
|
||||||
and if no other date fields have been previously read, then interpret
|
|
||||||
as a "concatenated date" (e.g. <literal>19990118</literal>).
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<substeps>
|
<substeps>
|
||||||
@ -514,13 +522,16 @@ Finish initial markup of cvs.sgml, and include it in the programmer's guide
|
|||||||
<para>
|
<para>
|
||||||
If there are more than 4 digits,
|
If there are more than 4 digits,
|
||||||
and if no other date fields have been previously read, then interpret
|
and if no other date fields have been previously read, then interpret
|
||||||
as a "concatenated date" (e.g. <literal>19990118</literal>).
|
as a "concatenated date" (e.g. <literal>19990118</literal>). 8
|
||||||
|
and 6 digits are interpreted as year, month, and day, while 7
|
||||||
|
and 5 digits are interpreted as year, day of year.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
<step>
|
<step>
|
||||||
<para>
|
<para>
|
||||||
If three digits and a year has already been decoded, then interpret as day of year.
|
If the token is three digits
|
||||||
|
and a year has already been decoded, then interpret as day of year.
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
@ -568,8 +579,10 @@ Finish initial markup of cvs.sgml, and include it in the programmer's guide
|
|||||||
|
|
||||||
<step>
|
<step>
|
||||||
<para>
|
<para>
|
||||||
If BC has been specified, negate the year and offset by one
|
If BC has been specified, negate the year and offset by one for
|
||||||
(there is no year zero in the Gregorian calendar).
|
internal storage
|
||||||
|
(there is no year zero in the Gregorian calendar, so numerically
|
||||||
|
1BC becomes year zero).
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
@ -578,9 +591,18 @@ Finish initial markup of cvs.sgml, and include it in the programmer's guide
|
|||||||
If BC was not specified, and if the year field was two digits in length, then
|
If BC was not specified, and if the year field was two digits in length, then
|
||||||
adjust the year to 4 digits. If the field was less than 70, then add 2000;
|
adjust the year to 4 digits. If the field was less than 70, then add 2000;
|
||||||
otherwise, add 1900.
|
otherwise, add 1900.
|
||||||
|
|
||||||
|
<tip>
|
||||||
|
<para>
|
||||||
|
Gregorian years 1-99AD may be entered by using 4 digits with leading
|
||||||
|
zeros (e.g. 0099 is 99AD). Three digits are also accepted as a
|
||||||
|
year under most circumstances, though depending on position the
|
||||||
|
numeric string may
|
||||||
|
be interpreted as doy instead.
|
||||||
|
</para>
|
||||||
|
</tip>
|
||||||
</para>
|
</para>
|
||||||
</step>
|
</step>
|
||||||
|
|
||||||
</procedure>
|
</procedure>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
@ -595,9 +617,9 @@ Finish initial markup of cvs.sgml, and include it in the programmer's guide
|
|||||||
</note>
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The Julian Day invented by the French scholar
|
The Julian Day was invented by the French scholar
|
||||||
Joseph Justus Scaliger (1540-1609)
|
Joseph Justus Scaliger (1540-1609)
|
||||||
and which probably takes its name from the Scaliger's father,
|
and probably takes its name from the Scaliger's father,
|
||||||
the Italian scholar Julius Caesar Scaliger (1484-1558).
|
the Italian scholar Julius Caesar Scaliger (1484-1558).
|
||||||
Astronomers have used the Julian period to assign a unique number to
|
Astronomers have used the Julian period to assign a unique number to
|
||||||
every day since 1 January 4713 BC. This is the so-called Julian Day
|
every day since 1 January 4713 BC. This is the so-called Julian Day
|
||||||
@ -606,7 +628,7 @@ Finish initial markup of cvs.sgml, and include it in the programmer's guide
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Julian Day is different from Julian Date.
|
<quote>Julian Day</quote> is different from <quote>Julian Date</quote>.
|
||||||
|
|
||||||
The Julian calendar was introduced by Julius Caesar in 45 BC. It was
|
The Julian calendar was introduced by Julius Caesar in 45 BC. It was
|
||||||
in common use until the 1582, when countries started changing to the
|
in common use until the 1582, when countries started changing to the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user