Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGs0f-0005C7-3c for pgsql-general@arkaria.postgresql.org; Thu, 10 May 2018 20:17:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fGs0d-0003Ln-VM for pgsql-general@arkaria.postgresql.org; Thu, 10 May 2018 20:17:51 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGs0d-0003Le-K6 for pgsql-general@lists.postgresql.org; Thu, 10 May 2018 20:17:51 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGs0b-0000rn-8A for pgsql-general@lists.postgresql.org; Thu, 10 May 2018 20:17:50 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9641C21448; Thu, 10 May 2018 16:17:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 10 May 2018 16:17:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=relops.com; h= content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= mesmtp; bh=ii51JG6znJE2Q/My2rih6E4Z/MmARlgW490Jgt2O2no=; b=HdITw jJ7T3hFTuAVq/csohsbno9IHZRHY1Yc8kzOHOVOQCCce869J9EJZ+P2Iyp//DDgD w3Ahhbj8OtBIRPT2F+Z0ne2Vrua5FyF7tIX8oJovgUbeB3wHp46N2sO+4lXlj8zy pY0iQrcRjpiV4io4B7uTKbMZf7F3FuuBObqaP4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=ii51JG6znJE2Q/My2rih6E4Z/MmAR lgW490Jgt2O2no=; b=l2Q3nB2bOrTzJ/hhXDanNO625XY2AkPge/cxhvbsWF551 fJ1dOjQuMtioKexTuMXUqlc7h18YlT/5KZlSBAqHDDswX37m56oiA2kqghSsXpcd X9bdAQpU34mY0k7gnuhh09SEiyZ4uL5/X/1tLrCvf8UjtsTvWGp5OpnELiIlnmpi Xwuu0aIXTqgFBmVZBFbhe9fZXsT/ZR++qvzxN9qbzfY+WOsviMoIIIlcXKGjc8mG aJYKQBCbqv3svzoRW4n6m8/QjG41XmciPcbqC+JjE9ioeWyqajJBFNHBWeEbFOsa mzxHoCUBbOMEkAUoZobWz3aShnkHKfpeThsoMgDUA== X-ME-Sender: Received: from [172.20.10.3] (unknown [148.252.128.195]) by mail.messagingengine.com (Postfix) with ESMTPA id 998CAE4488 for ; Thu, 10 May 2018 16:17:26 -0400 (EDT) From: Ben Hood Content-Type: multipart/alternative; boundary="Apple-Mail=_549ACCE9-8FAD-4324-9340-6510FA872895" Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: Domain based on TIMEZONE WITH TIME ZONE Date: Thu, 10 May 2018 21:17:17 +0100 References: <06EAD729-DC35-4E48-AB25-C42F7FA19C28@relops.com> <188A0270-0A9A-4ADE-A928-9067E99AE7B7@relops.com> <20180510103608.GB3622@hermes.hilbert.loc> <5188949D-FEDD-45C6-85CA-2E2AAC5CF1C9@relops.com> <93d7120e-ca04-467f-4b55-a5ca0e8d255c@aklaver.com> To: pgsql-general@lists.postgresql.org In-Reply-To: <93d7120e-ca04-467f-4b55-a5ca0e8d255c@aklaver.com> Message-Id: X-Mailer: Apple Mail (2.3445.6.18) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_549ACCE9-8FAD-4324-9340-6510FA872895 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 10 May 2018, at 17:38, Adrian Klaver = wrote: >=20 > Well if you are using a timestamp with timezone field the value is = always going to be stored as UTC. The TimeZone setting just determines = the rotation from the input value to the stored value and the reverse. = My previous point was just that Postgres will not enforce an offset on = input data. Good point. >> Then the only way to know what the effective zone offset will be is = to find out what the server default is. >> Is this plausible? >=20 > If you mean find the server default then yes: >=20 > test_(aklaver)> select current_setting('TimeZone'); > current_setting > ----------------- > US/Pacific Thanks for the tip.= --Apple-Mail=_549ACCE9-8FAD-4324-9340-6510FA872895 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii


On 10 May 2018, at 17:38, Adrian Klaver <adrian.klaver@aklaver.com> wrote:

Well if you = are using a timestamp with timezone field the value is always going to = be stored as UTC. The TimeZone setting just determines the rotation from = the input value to the stored value and the reverse. My previous point = was just that Postgres will not enforce an offset on input = data.

Good = point.

Then = the only way to know what the effective zone offset will be is to find = out what the server default is.
Is this plausible?

If you mean find the server default then yes:

test_(aklaver)> select = current_setting('TimeZone');
current_setting
-----------------
US/Pacific

Thanks for the tip.
= --Apple-Mail=_549ACCE9-8FAD-4324-9340-6510FA872895--