Information
If time stamps are not consistently applied and there is no common time reference, it is difficult to perform forensic analysis.
Time stamps generated by PostgreSQL must include date and time. Time is commonly expressed in UTC, a modern continuation of GMT, or local time with an offset from UTC.
Solution
Note: The following instructions use the PGDATA and PGVER environment variables. See supplementary content APPENDIX-F for instructions on configuring PGDATA and APPENDIX-H for PGVER.
To change log_timezone in postgresql.conf to use a different time zone for logs, as the database administrator (shown here as 'postgres'), run the following:
$ sudo su - postgres
$ vi ${PGDATA?}/postgresql.conf
log_timezone='UTC'
Next, restart the database:
$ sudo systemctl reload postgresql-${PGVER?}