Symptoms

OA database node and PostgreSQL server have different time zones what leads to wrong time in SQL statements performed through PostgreSQL console.

Cause

Incorrect time zone is set in PostgreSQL configuration file. Current time zone settings can be checked by running the following command on billing database server:

# grep timezone /var/lib/pgsql/9.6/data/postgresql.conf
log_timezone = 'US/Eastern'
timezone = 'US/Eastern'

Resolution

  1. In case of wrong zones in postgresql.conf its content can be adjusted to comfort the correct time zone. Full list of zones is available in pg_timezone_names view:

    pba=> SELECT * FROM pg_timezone_names;
    

To apply changes made to configuration file it is required to stop pba service, restart PostgreSQL service, and start pba service back.

Note

Path to postgresql.conf can be different in some cases.

Internal content

Link on internal Article