setting timezone
in postgresql.conf
just sets the default for clients without this setting. If you see other value, means client sets it to some local value.
Or alternatively that you did not reload server:
select pg_reload_conf();
To check the setting and what's needed to enable it, you can:
t=# select * from pg_settings where name = 'TimeZone';
-[ RECORD 1 ]---+----------------------------------------------------------------
name | TimeZone
setting | UTC
unit |
category | Client Connection Defaults / Locale and Formatting
short_desc | Sets the time zone for displaying and interpreting time stamps.
extra_desc |
context | user
vartype | string
source | configuration file
min_val |
max_val |
enumvals |
boot_val | GMT
reset_val | UTC
sourcefile | /Users/vao/t96/postgresql.conf
sourceline | 556
pending_restart | f
pending_restart
false
means you don't need to restart postgres, but you still need to reload config after change. Also as you see this setting influence client only. And obviously client can easily override ths default.
to set timezone client side, just run set timezone to 'UTC'
.
in order to set this for some user permanently, use alter user uname set timezone
and same for setting default for db.