Re: AT TIME ZONE correction

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org>
Subject: Re: AT TIME ZONE correction
Date: 2018-09-03 13:20:34
Message-ID: 20180903132034.GD25700@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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.

--
Bruce Momjian <bruce(at)momjian(dot)us> 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 +

Attachment Content-Type Size
time_zone.diff text/x-diff 2.9 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Michael Paquier 2018-09-03 23:48:14 Re: you need this kind of explanation
Previous Message PG Doc comments form 2018-09-03 08:05:33 you need this kind of explanation