Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eH81c-0006U0-2K for pgsql-jdbc@arkaria.postgresql.org; Tue, 21 Nov 2017 12:51:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eH81b-000431-0W for pgsql-jdbc@arkaria.postgresql.org; Tue, 21 Nov 2017 12:51:39 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eH7vD-0003EX-7A for pgsql-jdbc@lists.postgresql.org; Tue, 21 Nov 2017 12:45:03 +0000 Received: from [195.159.176.226] (helo=blaine.gmane.org) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eH7v8-0005Kg-Db for pgsql-jdbc@postgresql.org; Tue, 21 Nov 2017 12:45:02 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eH7us-0000XN-Qk for pgsql-jdbc@postgresql.org; Tue, 21 Nov 2017 13:44:42 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Re: Retrieve the server's time zone Date: Tue, 21 Nov 2017 13:44:34 +0100 Lines: 24 Message-ID: References: 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: Content-Language: en-GB X-Host-Lookup-Failed: Reverse DNS lookup failed for 195.159.176.226 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Vladimir Sitnikov schrieb am 21.11.2017 um 12:52: > Could you please clarify what is the case of "receiving server-side time zone"? > > For instance: do you need PostgreSQL time zone or OS time zone? I need a timestamp in the server's time zone. Or at leas the time zone of the OS. The one that is configured for Postgres on the server would do as well (in my case that is the server's OS time zone) E.g. select localtimestamp will return the server's local time converted to the *client's* time zone in JDBC. In psql however, it does return the timestamp as "seen" by the server. I could live with getting the server's OS time zone through "show timezone" because then I could convert current_timestamp back to that time zone. Thomas