Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qeM7e-006a3W-9X for pgsql-docs@arkaria.postgresql.org; Thu, 07 Sep 2023 21:01:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qeM7c-004lgc-9Z for pgsql-docs@arkaria.postgresql.org; Thu, 07 Sep 2023 21:01:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qeM7c-004lfq-0r for pgsql-docs@lists.postgresql.org; Thu, 07 Sep 2023 21:01:03 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qeM7Y-003JbJ-GS for pgsql-docs@lists.postgresql.org; Thu, 07 Sep 2023 21:01:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=2yMiQA1G54RCn1BYpmVaf9UTdQa7JQ4jWIAuZpwX+Qg=; b=gZfYd dWvkrkH+wSD7hfDbtXD6hkyFDt9Eni3ddmex+OTZjedyjkeXypa5rOjjQpEbsPs/b6KiPZHoWIP/V /TMvmjac2tpTjKEGySSLKMumWsR04NIQ/oeKsVwgIbu4lNWM9xVkAQrX6+lVIJIVykSzrN3BZWnN2 5D7fA1JbkpdBOMBq47DaWIcp1NOFgtZKhETxhQUB//IMmFwlKpp51nieEjCxIgINJqffNNTBed3cJ 7gqK/sjSSWUHtNpaQKz3DbtTd2UzjxwLg69Z0OIRoTrvre6wxHTZ0svwX7eoyLXVclGg1P4/stCC1 R+p7rg6x1FwbFImEGV0m7ymCK1ceA==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qeM7X-00GUwI-1T; Thu, 07 Sep 2023 17:00:59 -0400 Date: Thu, 7 Sep 2023 17:00:59 -0400 From: Bruce Momjian To: Tom Lane Cc: davecramer@postgres.rocks, pgsql-docs@lists.postgresql.org Subject: Re: Incorrect/confusing information about timetz Message-ID: References: <168451942371.714.9173574930845904336@wrigleys.postgresql.org> <1757505.1694119308@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BTzFmqq6IAaEb9pX" Content-Disposition: inline In-Reply-To: <1757505.1694119308@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --BTzFmqq6IAaEb9pX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 7, 2023 at 04:41:48PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > Uh, yes to the storage part, no to the output part. ;-) Postgres does > > store the timetz time zone offset, but it doesn't adust it once it is > > stored so doesn't adjust for the session time zone: > > Right, it just stores a numeric UTC offset. > > > Do we want to document this? > > Section 8.5.1.2. Times already says "The appropriate time zone offset > is recorded in the time with time zone value." Maybe that could be > made a little more precise, say "The resolved numeric offset from UTC > is recorded in the time with time zone value." Yeah, there is no mention of it odd output behavior. Here is a patch to add that. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you. --BTzFmqq6IAaEb9pX Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="timetz.diff" diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 8d32a8c9c5..240d4875d2 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -2040,7 +2040,8 @@ MINUTE TO SECOND America/New_York. In this case specifying the date is required in order to determine whether standard or daylight-savings time applies. The appropriate time zone offset is recorded in the - time with time zone value. + time with time zone value and is output as stored; + it is not adjusted to the active time zone. --BTzFmqq6IAaEb9pX--