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 1qo5rE-0008Ad-W6 for pgsql-general@arkaria.postgresql.org; Wed, 04 Oct 2023 17:40:25 +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 1qo5rC-001spA-TK for pgsql-general@arkaria.postgresql.org; Wed, 04 Oct 2023 17:40:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qo5rC-001soW-IU for pgsql-general@lists.postgresql.org; Wed, 04 Oct 2023 17:40:23 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qo5r8-00028e-Ge for pgsql-general@lists.postgresql.org; Wed, 04 Oct 2023 17:40:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 394HeGVR2608037; Wed, 4 Oct 2023 13:40:16 -0400 From: Tom Lane To: Lincoln Swaine-Moore cc: Marian Wendt , pgsql-general@lists.postgresql.org Subject: Re: Strategies for converting UTC data to local windows for arbitrary resolutions and timezones In-reply-to: References: <2582288.1696428710@sss.pgh.pa.us> <13eb1e62-9c00-4878-bb82-ef003eca884c@yahoo.com> <2602231.1696438458@sss.pgh.pa.us> <2605699.1696440169@sss.pgh.pa.us> Comments: In-reply-to Lincoln Swaine-Moore message dated "Wed, 04 Oct 2023 13:35:51 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2608035.1696441216.1@sss.pgh.pa.us> Date: Wed, 04 Oct 2023 13:40:16 -0400 Message-ID: <2608036.1696441216@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Lincoln Swaine-Moore writes: >> Yeah. One thing to keep in mind is that that might have different >> behavior in terms of the evaluation of the arguments to the function, >> ie which timezone setting is your input parsed according to. > I see. You mean, in the event that it doesn't conform to an entry in > `pg_timezone_names`? I do have control over the possible options the user > can provide, so it should be straightforward to make sure those all have > entries. If you mean that your input will always include an explicit zone specification, then this doesn't affect you. What I was thinking about was that select generate_series('2023-10-04 13:30', ...) is going to mean different things depending on the zone setting that prevails when that constant is parsed. regards, tom lane