Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fxNfS-0003BJ-94 for pgsql-docs@arkaria.postgresql.org; Wed, 05 Sep 2018 02:35:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fxNfQ-0001kI-MC for pgsql-docs@arkaria.postgresql.org; Wed, 05 Sep 2018 02:35:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fxNfQ-0001kA-D7 for pgsql-docs@lists.postgresql.org; Wed, 05 Sep 2018 02:35:40 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fxNfN-0005UR-N2 for pgsql-docs@postgresql.org; Wed, 05 Sep 2018 02:35:39 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1fxNfL-0007g0-RC; Tue, 04 Sep 2018 22:35:35 -0400 Date: Tue, 4 Sep 2018 22:35:35 -0400 From: Bruce Momjian To: Tom Lane Cc: PostgreSQL-documentation Subject: Re: AT TIME ZONE correction Message-ID: <20180905023535.GC13695@momjian.us> References: <20180901225557.GA22406@momjian.us> <24277.1535844643@sss.pgh.pa.us> <20180901233736.GA25700@momjian.us> <20180902032821.GB25700@momjian.us> <14024.1535912518@sss.pgh.pa.us> <20180903021159.GC25700@momjian.us> <20180903132034.GD25700@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180903132034.GD25700@momjian.us> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Sep 3, 2018 at 09:20:34AM -0400, Bruce Momjian wrote: > On Sun, Sep 2, 2018 at 10:11:59PM -0400, Bruce Momjian wrote: > > On Sun, Sep 2, 2018 at 02:21:58PM -0400, Tom Lane wrote: > > > I still find this to be more confusing than helpful. In particular, > > > I do not think that it's possible to explain this behavior clearly > > > without mentioning that timestamp with time zone values are always > > > stored in UTC and what AT TIME ZONE really does is convert between UTC > > > and the specified zone (in a direction dependent on which type is > > > supplied as argument). > > > > Agreed. The more I dig into this the more I learn. I have developed > > the attached patch which I hope this time is an improvement. > > I polished the text some more and changed the three-letter time zone > abbreviation (e.g., MST) to use the more general text, e.g. > "America/Denver". We should not be encouraging people to specify the > daylight savings time status based on the date in the date/time string. Patch applied through 9.3. I ended up adding a third example: https://git.postgresql.org/pg/commitdiff/dd6073f22a6b5dd6181d8324465dd3c0bf1851e8 -- Bruce Momjian 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 +