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 1iCxYt-00016f-Ld for pgsql-general@arkaria.postgresql.org; Wed, 25 Sep 2019 03:01:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iCxYs-0007os-FD for pgsql-general@arkaria.postgresql.org; Wed, 25 Sep 2019 03:01:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iCxYs-0007ol-2Z for pgsql-general@lists.postgresql.org; Wed, 25 Sep 2019 03:01:50 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iCxYl-0004nc-Bx for pgsql-general@lists.postgresql.org; Wed, 25 Sep 2019 03:01:49 +0000 Received: from [192.168.127.1] (port=52385 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.92.2 (FreeBSD)) (envelope-from ) id 1iCxYi-0004fr-46; Wed, 25 Sep 2019 03:01:40 +0000 Received: from localhost ([127.0.0.1]:11709 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.92.1 (FreeBSD)) (envelope-from ) id 1iCxYh-0007pG-Ju; Wed, 25 Sep 2019 03:01:39 +0000 From: Andrew Gierth To: rob stone Cc: Paul McGarry , Adrian Klaver , pgsql-general@lists.postgresql.org Subject: Re: How to get timezone offset in timestamp with time zone AT TIME ZONE output. In-Reply-To: <85cd91320ad71bd44d8d82aed52b29c2b08888ab.camel@gmail.com> (rob stone's message of "Wed, 25 Sep 2019 12:56:38 +1000") Message-ID: <871rw5nkqx.fsf@news-spur.riddles.org.uk> References: <87impio1tf.fsf@news-spur.riddles.org.uk> <91469459-36f7-41a4-09e9-c88d693cccef@aklaver.com> <85cd91320ad71bd44d8d82aed52b29c2b08888ab.camel@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (berkeley-unix) Date: Wed, 25 Sep 2019 04:01:39 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "rob" == rob stone writes: rob> You can EXTRACT timezone, timezone_hour and timezone_minute from a rob> timestamp. Using 'timezone' returns a value representing seconds rob> from UTC. Yes, but this always outputs a value representing the server timezone; there's no way (other than the same function set_config trick I gave above) to make it return a value that represents a different timezone per row. -- Andrew (irc:RhodiumToad)