Sample Header Ad - 728x90

TimeZone Setting On PostgreSQL Databases

0 votes
0 answers
2893 views
I have a **Patroni cluster** with two **Ubuntu 22 db server**. The timezone of my instances was set to **UTC**. I have needed to edit them to set the local timezone to **Europe/Istanbul**. I have made the timezone change on OS-level. When i checked the timezone setting with timedatectl command, i saw local time was correct. And, I applied the setting one by one to all my databases on my server:
DATABASE "db_name" SET TIMEZONE TO "Europe/Istanbul";
Also applied the setting:
ALTER SYSTEM SET TimeZone TO 'Europe/Istanbul';
And i edited my patroni config file and entered timezone setting like:
: Europe/Istanbul
After that, i restarted my patroni cluster. After restarting my cluster, i saw that some of databases had applied the changes but other ones had not. I checked those databases configuration. The configuration was same with the applied ones. I still see old timezone setting which was ETC/UTC when I execute sql command below:
timezone
I am a little bit confused about it. Strange situation. What might cause the situation? Do i miss something?
Asked by user274715
Sep 6, 2023, 11:19 AM