Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iMBv8-0006oC-Oi for pgsql-general@arkaria.postgresql.org; Sun, 20 Oct 2019 14:10:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iMBv7-0002sN-93 for pgsql-general@arkaria.postgresql.org; Sun, 20 Oct 2019 14:10:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iMBv6-0002sA-W4 for pgsql-general@lists.postgresql.org; Sun, 20 Oct 2019 14:10:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iMBuz-0001B9-Cp for pgsql-general@postgresql.org; Sun, 20 Oct 2019 14:10:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x9KEAjJC012911; Sun, 20 Oct 2019 10:10:45 -0400 From: Tom Lane To: Luca Ferrari cc: pgsql-general Subject: Re: UTC-6 or UTC+6? In-reply-to: References: Comments: In-reply-to Luca Ferrari message dated "Sun, 20 Oct 2019 11:35:04 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12909.1571580645.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 20 Oct 2019 10:10:45 -0400 Message-ID: <12910.1571580645@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Luca Ferrari writes: > template1=3D# select '2019-10-22 16:00:00' at time zone 'Europe/Rome' as= my_time > , '2019-10-22 16:00:00' at time zone 'America/Denver' as what_should_be, > '2019-10-22 16:00:00' at time zone 'UTC-6' as utc_minus_6, > '2019-10-22 16:00:00' at time zone 'UTC+6' as utc_plus_6; > -[ RECORD 1 ]--+-------------------- > my_time | 2019-10-22 16:00:00 > what_should_be | 2019-10-22 08:00:00 > utc_minus_6 | 2019-10-22 20:00:00 > utc_plus_6 | 2019-10-22 08:00:00 > Now, the denver time should be 8:00, which is what is reported as > UTC+6, but as far as I know Denver is UTC-6 (in daylight saving). What > am I missing here? Timezone names of that form are interpreted per the POSIX standard, which uses positive for west-of-Greenwich, unlike the ISO standard which uses the opposite sign. See https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-TI= MEZONES regards, tom lane