Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEca9-0007xz-1D for pgsql-general@arkaria.postgresql.org; Tue, 14 Nov 2017 14:52:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eEca8-0000G4-Jp for pgsql-general@arkaria.postgresql.org; Tue, 14 Nov 2017 14:52:56 +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.84_2) (envelope-from ) id 1eEcXb-0004J1-6T for pgsql-general@postgresql.org; Tue, 14 Nov 2017 14:50:19 +0000 Received: from [195.159.176.226] (helo=blaine.gmane.org) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eEcXV-0005Pb-13 for pgsql-general@postgresql.org; Tue, 14 Nov 2017 14:50:18 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eEcXJ-0001UD-8N for pgsql-general@postgresql.org; Tue, 14 Nov 2017 15:50:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-general@postgresql.org From: Thomas Kellerer Subject: Re: Retrieve the server's time zone Date: Tue, 14 Nov 2017 15:49:58 +0100 Lines: 24 Message-ID: References: <15670.1510670191@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@blaine.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 In-Reply-To: <15670.1510670191@sss.pgh.pa.us> Content-Language: de-DE X-Host-Lookup-Failed: Reverse DNS lookup failed for 195.159.176.226 (failed) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Tom Lane schrieb am 14.11.2017 um 15:36: >> is there any way (short of writing a function in an untrusted PL) >> to determine the actual time zone (or time) of the server OS? > > AFAIK that would only be true if some part of your client stack > is issuing a SET TIMEZONE command. (libpq will do that if it finds > a PGTZ environment variable set, but not in response to plain TZ.) Ah, interesting. I do that through JDBC, so apparently that's the part to blame. > If that's true, and you can't/don't want to change it, you could try > > select reset_val from pg_settings where name = 'TimeZone'; Hmm, this does not seem to work. I am connected to a server with Asia/Bangkok but through JDBC that query still returns Europe/Berlin (which is my client's time zone) So apparently the JDBC driver somehow "persists" this setting. I will take this to the JDBC mailing list then, thanks. Thomas -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general