The following bug has been logged on the website:
Bug reference: 15547
Logged by: Matteo Bignotti
Email address: gugoll@gmail.com
PostgreSQL version: 9.6.1
Operating system: CentOS 7
Description:
I have a bunch of servers that never restarted in the past couple of months
and had postgres running since before Nov. 4th and I discovered that their
default timezone changed in the background.
● postgresql.service - PostgreSQL database server
[...]
Active: active (running) since Tue 2018-10-23 15:52:42 PDT; 1 months 18
days ago
in postgresql.conf the value of timezone and log_timezone is set to
"localtime" and I have a symlink in /usr/share/zoneinfo/ that points at the
timezone I want (also I know that's how Debian handles it). This works fine,
always, except in this situation I cannot seem to reproduce in any way. A
simple restart of postgres fixes the situation, but that's not what I wanted
to do.
I run these queries on 2 different servers in the America/Los_Angeles
timezone: psql [credentials] -c "SELECT now();" -c "show timezone;" -c
"SELECT timezone('UTC', now()) as UTC"
[no bug]
now
-------------------------------
2018-12-11 16:02:11.783056-08
(1 row)
TimeZone
-----------
localtime
(1 row)
utc
----------------------------
2018-12-12 00:02:11.823465
(1 row)
[with bug]
now
-------------------------------
2018-12-12 00:03:30.970079+00
(1 row)
TimeZone
-----------
localtime
(1 row)
utc
----------------------------
2018-12-12 00:03:30.971193
(1 row)
I really blame this situation on DST simply because that's the only thing
that happened in this timeframe that could've caused a timezone "flop".
both servers point to America/Los_Angeles and this server "with bug" is the
last one I have that exhibits, all my attempts at reproducing this have been
in vain.
Thank you