Modify postgresql time zone

Modify postgresql time zone

1. Enter the command [systemctl status postgresql-12.service] to query the current running status of the pgsql server.

Insert image description here

2. Find the data folder [/data/database/postgresql/data/] and open the [postgresql.conf] file
Insert image description here

3. Modify the node [timezone = 'America/New_York'] to [timezone = 'PRC']
4. Modify the node [log_timezone = 'America/New_York'] to [log_timezone = 'PRC']

Insert image description here

5. Enter the command [systemctl restart postgresql-12.service] to restart the pgsql service

Insert image description here

6. Navicat enters [show time zone;] to query the pgsql time zone
7. Navicat enters [select CURRENT_DATE,CURRENT_TIME;] to query the pgsql current time.

Insert image description here

Guess you like

Origin blog.csdn.net/qq_37959253/article/details/129464435