public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bruce Momjian <[email protected]>
To: PostgreSQL-documentation <[email protected]>
Subject: AT TIME ZONE correction
Date: Sat, 1 Sep 2018 18:55:57 -0400
Message-ID: <[email protected]> (raw)
Looking over the AT TIME ZONE docs, I think they are subtly confusing.
The order of conversion specific in the first example should _start_
with the assumption of local time zone for the time stamp, not something
that happens after AT TIME ZONE is applied. The ordering in current
docs makes the second example confusing too.
The attached patch fixes this.
--
Bruce Momjian <[email protected]> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
Attachments:
[text/x-diff] time_zone.diff (1.2K, 2-time_zone.diff)
download | inline diff:
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
new file mode 100644
index bb794e0..ba22b7d
*** a/doc/src/sgml/func.sgml
--- b/doc/src/sgml/func.sgml
*************** SELECT TIMESTAMP '2001-02-16 20:38:40' A
*** 8145,8153 ****
SELECT TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-05' AT TIME ZONE 'MST';
<lineannotation>Result: </lineannotation><computeroutput>2001-02-16 18:38:40</computeroutput>
</screen>
! The first example takes a time stamp without time zone and interprets it as MST time
! (UTC-7), which is then converted to PST (UTC-8) for display. The second example takes
! a time stamp specified in EST (UTC-5) and converts it to local time in MST (UTC-7).
</para>
<para>
--- 8145,8154 ----
SELECT TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-05' AT TIME ZONE 'MST';
<lineannotation>Result: </lineannotation><computeroutput>2001-02-16 18:38:40</computeroutput>
</screen>
! The first example takes a time stamp without time zone, converts it
! to local time (PST, UTC-8), then converts it to time in MST (UTC-7)
! for display. The second example takes a time stamp specified in EST
! (UTC-5) and converts it to time in MST (UTC-7) for display.
</para>
<para>
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: AT TIME ZONE correction
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox