The timezone oddities

From: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: The timezone oddities
Date: 2014-02-04 19:23:43
Message-ID: CAL_0b1tFPUVvHuQE8uEkYmryDds2TLL=va+37shAyWvQ1mfeOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Gentoo Linux, PostgreSQL 9.2.4.

I'm trying to find out why postgres uses a specific time zone that I
don't expect to be used, and without any success so far. The situation
seems strange to me, but I could probably miss something.

Here is what I found out.

1. There are no any per-database and no any per-user settings (the
\drds command shows both).

postgres=# \drds
No settings found.

2. There is nothing that changes the timezone from the system one in
postgresql.conf.

postgres(at)ip-xx ~ $ grep timezone
/db/postgresql/9.2/data/postgresql.conf
#log_timezone = unknown # actually, defaults to TZ environment
#timezone = unknown # actually, defaults to TZ environment
#timezone_abbreviations = 'Default' # Select the set of available time zone

3. The system timezone is PST.

postgres(at)ip-xx ~ $ date
Tue Feb 4 10:31:51 PST 2014

4. No timezone is set as a command line parameter for the server.

postgres(at)ip-xx ~ $ grep PGOPTS /etc/conf.d/postgresql-9.2
#PGOPTS="-N 512 -B 1024"

postgres(at)ip-xx ~ $ ps aux | grep 'db/postgres'| grep -v grep
postgres 23561 0.0 0.6 18410880 445116 ? S Jan28 0:32
/usr/lib64/postgresql-9.2/bin/postgres -D /db/postgresql/9.2/data -D
/db/postgresql/9.2/data --data-directory=/db/postgresql/9.2/data

5. There is no env settings for PG* or TZ that might also affect
psql's behaviour.

postgres(at)ip-xx ~ $ env | grep PG
postgres(at)ip-xx ~ $ env | grep TZ

6. Therefore, the time zone is GMT.

postgres(at)ip-xx ~ $ psql
psql (9.2.4)
Type "help" for help.

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

Do you have any thoughts of where else this GMT could be set from?

Thank you in advance.

--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray(dot)ru(at)gmail(dot)com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-02-04 19:29:36 Re: The timezone oddities
Previous Message Evan Martin 2014-02-04 19:19:01 Re: Re: Drop all overloads of a function without knowing parameter types