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

Commitfd467ce

Browse files
committed
Doc: clarify behavior of timestamptz input some more.
Try to make it absolutely plain that we don't retain theoriginally specified time zone, only the UTC timestamp.While at it, make glossary entries for "UTC" and "GMT".Author: Robert Treat <rob@xzilla.net>Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/173796426022.1064.9135167366862649513@wrigleys.postgresql.orgBackpatch-through: 13
1 parent5a874c6 commitfd467ce

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

‎doc/src/sgml/datatype.sgml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,24 +2226,27 @@ TIMESTAMP '2004-10-19 10:23:54+02'
22262226
<programlisting>
22272227
TIMESTAMP WITH TIME ZONE '2004-10-19 10:23:54+02'
22282228
</programlisting>
2229+
</para>
22292230

2230-
In a literal that has been determined to be <type>timestamp without time
2231+
<para>
2232+
In a value that has been determined to be <type>timestamp without time
22312233
zone</type>, <productname>PostgreSQL</productname> will silently ignore
22322234
any time zone indication.
22332235
That is, the resulting value is derived from the date/time
2234-
fields in the inputvalue, and is not adjusted for time zone.
2236+
fields in the inputstring, and is not adjusted for time zone.
22352237
</para>
22362238

22372239
<para>
2238-
For <type>timestamp with time zone</type>, the internally stored
2239-
value is always in UTC (Universal
2240-
Coordinated Time, traditionally known as Greenwich Mean Time,
2241-
<acronym>GMT</acronym>). An input value that has an explicit
2242-
time zone specified is converted to UTC using the appropriate offset
2240+
For <type>timestamp with time zone</type> values, an input string
2241+
that includes an explicit time zone will be converted to UTC
2242+
(<glossterm linkend="glossary-utc">Universal Coordinated
2243+
Time</glossterm>) using the appropriate offset
22432244
for that time zone. If no time zone is stated in the input string,
22442245
then it is assumed to be in the time zone indicated by the system's
22452246
<xref linkend="guc-timezone"/> parameter, and is converted to UTC using the
22462247
offset for the <varname>timezone</varname> zone.
2248+
In either case, the value is stored internally as UTC, and the
2249+
originally stated or assumed time zone is not retained.
22472250
</para>
22482251

22492252
<para>

‎doc/src/sgml/glossary.sgml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,11 @@
749749
</glossdef>
750750
</glossentry>
751751

752+
<glossentry>
753+
<glossterm>GMT</glossterm>
754+
<glosssee otherterm="glossary-utc" />
755+
</glossentry>
756+
752757
<glossentry id="glossary-grant">
753758
<glossterm>Grant</glossterm>
754759
<glossdef>
@@ -1865,6 +1870,17 @@
18651870
</glossdef>
18661871
</glossentry>
18671872

1873+
<glossentry id="glossary-utc">
1874+
<glossterm>UTC</glossterm>
1875+
<glossdef>
1876+
<para>
1877+
Universal Coordinated Time, the primary global time reference,
1878+
approximately the time prevailing at the zero meridian of longitude.
1879+
Often but inaccurately referred to as GMT (Greenwich Mean Time).
1880+
</para>
1881+
</glossdef>
1882+
</glossentry>
1883+
18681884
<glossentry id="glossary-vacuum">
18691885
<glossterm>Vacuum</glossterm>
18701886
<glossdef>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp