Re: [GENERAL] Retrieve the server's time zone

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Retrieve the server's time zone
Дата
Msg-id 15670.1510670191@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [GENERAL] Retrieve the server's time zone  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: [GENERAL] Retrieve the server's time zone
Список pgsql-general
Thomas Kellerer <spam_eater@gmx.net> writes:
> is there any way (short of writing a function in an untrusted PL) to determine the actual time zone (or time) of the
serverOS?  

The default value of the timezone parameter is as close as you'll get
in modern versions of PG.

> "show timezone" always returns the client's time zone.

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.)

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';
        regards, tom lane


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

В списке pgsql-general по дате отправления:

Предыдущее
От: Jose Maria Terry Jimenez
Дата:
Сообщение: Re: [GENERAL] Because PostgreSQL is compiling in old versions of OS?
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: [GENERAL] Retrieve the server's time zone