agora inbox for pgsql-docs@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Álvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Robert Treat <rob@xzilla.net>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: bristleconeweb@gmail.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: timestamp with time zone ~> GMT
Date: Mon, 03 Feb 2025 12:23:07 -0500
Message-ID: <410526.1738603387@sss.pgh.pa.us> (raw)
In-Reply-To: <202502031621.j4h5q2bp3orj@alvherre.pgsql>
References: <202502031621.j4h5q2bp3orj@alvherre.pgsql>

=?utf-8?Q?=C3=81lvaro?= Herrera <alvherre@alvh.no-ip.org> writes:
> On 2025-Feb-03, Robert Treat wrote:
>> This does seem to come up often enough that it probably is worth being
>> a bit more explicit about how this works; attached patch attempts
>> that.

> LGTM.

Hmm, I kind of like the up-front statement that timestamptz stores
UTC.  How about this simpler change?

diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index 1d9127e94e..269809dc81 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -2263,6 +2263,8 @@ TIMESTAMP WITH TIME ZONE '2004-10-19 10:23:54+02'
       then it is assumed to be in the time zone indicated by the system's
       <xref linkend="guc-timezone"/> parameter, and is converted to UTC using the
       offset for the <varname>timezone</varname> zone.
+      In either case, the originally stated or assumed time zone is not
+      retained.
      </para>
 
      <para>

>> Note, I dropped the bit about GMT; that change was made ~40 years ago,
>> and I suspect it is close to noise for many people these days, though
>> it could be added back if folks feel strongly about it.

> I don't feel strongly about it, but another option might be to add a
> <footnote> so that it is still there but less intrusive.  Grepping for
> GMT in the postgres repo there are still over 1400 matches of all kinds.

I think we'd better not remove the gloss for GMT just yet.  It's still
the magic boot value for the timezone GUC for example (cf pgtz.c),
and it's still embedded in the IANA timezone database:

$ ls /usr/share/zoneinfo/Etc
GMT     GMT+11  GMT+4  GMT+8  GMT-10  GMT-14  GMT-5  GMT-9      UTC
GMT+0   GMT+12  GMT+5  GMT+9  GMT-11  GMT-2   GMT-6  GMT0       Universal
GMT+1   GMT+2   GMT+6  GMT-0  GMT-12  GMT-3   GMT-7  Greenwich  Zulu
GMT+10  GMT+3   GMT+7  GMT-1  GMT-13  GMT-4   GMT-8  UCT

Maybe we could move the info to the Glossary, but that seems like
a separate matter from what's under discussion here.

			regards, tom lane





view thread (12+ messages)  latest in thread

Message-ID: <410526.1738603387@sss.pgh.pa.us>
Permalink:  ../410526.1738603387@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/410526.1738603387@sss.pgh.pa.us

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: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, rob@xzilla.net, laurenz.albe@cybertec.at, bristleconeweb@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: timestamp with time zone ~> GMT
  In-Reply-To: <410526.1738603387@sss.pgh.pa.us>

* 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