PostgreSQL timezone does not match system timezone

Posted by Martin C. on Server Fault See other posts from Server Fault or by Martin C.
Published on 2013-11-12T08:17:21Z Indexed on 2013/11/12 9:58 UTC
Read the original article Hit count: 493

Filed under:
|

I have several PostgreSQL 9.2 installations where the timezone used by PostgreSQL is GMT, despite the entire system being "Europe/Vienna". I double-checked that postgresql.conf does not contain timezone setting, so according to the documentation it should fallback to the system's timezone.

However,

# su -s /bin/bash postgres -c "psql mydb"

mydb=# show timezone;
 TimeZone 
----------
 GMT
(1 row)

mydb=# select now();
              now              
-------------------------------
 2013-11-12 08:14:21.697622+00
(1 row)

Any hints, where the GMT timezone could come from? The system user does not have TZ set and the /etc/timezone and /etc/timeinfo seem to be configured correctly.

# cat /etc/timezone 
Europe/Vienna
# date
Tue Nov 12 09:15:42 CET 2013

Any hints are appreciated, thanks in advance!

© Server Fault or respective owner

Related posts about postgresql

Related posts about timezone