Linux

How to Set PostgreSQL timezone to UTC on Linux

You can set PostgreSQL’s timezone to UTC at different levels: session, database, user, or globally in the server config. Here are the main ways:

1. Open PostgreSQL config:

sudo nano /etc/postgresql/17/main/postgresql.conf

2. Find and update: 

timezone = 'UTC'

3. Restart PostgreSQL:

sudo systemctl restart postgresql

4. Check timezone inside PostgreSQL:

SHOW timezone;

Thanks for visit my website