On 02/04/2014 11:23 AM, Sergey Konoplev wrote:
> 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@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@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@ip-xx ~ $ grep PGOPTS /etc/conf.d/postgresql-9.2
> #PGOPTS="-N 512 -B 1024"
>
> postgres@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@ip-xx ~ $ env | grep PG
> postgres@ip-xx ~ $ env | grep TZ
>
> 6. Therefore, the time zone is GMT.
>
> postgres@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?
Does the below apply?:
http://www.postgresql.org/message-id/26874.1391127434@sss.pgh.pa.us
>
> Thank you in advance.
>
--
Adrian Klaver
adrian.klaver@gmail.com