"localtime" value in TimeZone - Mailing list pgsql-hackers

From Shay Rojansky
Subject "localtime" value in TimeZone
Date
Msg-id CADT4RqCCnj6FKLisvT8tTPfTP4azPhhDFJqDF1JfBbOH5w4oyQ@mail.gmail.com
Whole thread Raw
Responses Re: "localtime" value in TimeZone  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Greetings everyone.

In (certain) out-of-the-box PostgreSQL installations, the timezone GUC is set to "localtime", which seems to mean to query the OS for the value. Unless I'm mistaken, the issue with this is that it doesn't allow clients inspecting the TimeZone GUC to actually know what timezone the server is in, making the GUC largely useless (and creates friction as the GUC can't be expected to always contain valid IANA/Olson values). It would be more useful if PostgreSQL exposed the actual timezone provided by the OS.

Does this make sense?

As a side note, there doesn't seem to be any specific documentation on the special "localtime" value of this GUC (e.g. https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-TIMEZONES).

Shay

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [bug fix] Produce a crash dump before main() on Windows
Next
From: Alvaro Herrera
Date:
Subject: Re: [PATCH] minor bugfix for pg_basebackup (9.6 ~ )