From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-general@postgresql.org
Subject: Re: Retrieve the server's time zone
Date: Tue, 14 Nov 2017 15:49:58 +0100
Message-ID: <ouevqe$3el$1@blaine.gmane.org> (raw)
In-Reply-To: <15670.1510670191@sss.pgh.pa.us>
References: <oueeno$619$1@blaine.gmane.org>
<15670.1510670191@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: spam_eater@gmx.net
Subject: Re: Retrieve the server's time zone
In-Reply-To: <ouevqe$3el$1@blaine.gmane.org>
References: <oueeno$619$1@blaine.gmane.org> <15670.1510670191@sss.pgh.pa.us> <ouevqe$3el$1@blaine.gmane.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox