Re: localtime ? - Mailing list pgsql-general

From Tom Lane
Subject Re: localtime ?
Date
Msg-id 28722.1434063018@sss.pgh.pa.us
Whole thread Raw
In response to localtime ?  (James Cloos <cloos@jhcloos.com>)
Responses Re: localtime ?
List pgsql-general
James Cloos <cloos@jhcloos.com> writes:
> On one of my servers, even thopugh everything is in UTC, pg insists on
> using timezone -04 by default.

> | cloos=# SELECT current_setting('TIMEZONE');
> |  current_setting
> | -----------------
> |  localtime
> | (1 row)

AFAIK, that is not a valid value for timezone, unless someone has stuck a
file by that name into your zoneinfo database directory (which I think is
standard practice on some distros though by no means all).  If so, it
would mean whatever the file said, which would very likely not be UTC.

> But:
> | :; grep timezone /etc/postgresql/9.3/main/*
> | /etc/postgresql/9.3/main/postgresql.conf:log_timezone = 'UTC'
> | /etc/postgresql/9.3/main/postgresql.conf:timezone = 'UTC'

Evidently that grep has little to do with your actual configuration
source.  This would likely be informative as to where "localtime"
is coming from:

    select * from pg_settings where name = 'TimeZone';

            regards, tom lane


pgsql-general by date:

Previous
From: James Cloos
Date:
Subject: localtime ?
Next
From: James Cloos
Date:
Subject: Re: localtime ?