Re: localtime ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: James Cloos <cloos(at)jhcloos(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: localtime ?
Date: 2015-06-11 22:50:18
Message-ID: 28722.1434063018@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

James Cloos <cloos(at)jhcloos(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message James Cloos 2015-06-11 23:48:48 Re: localtime ?
Previous Message James Cloos 2015-06-11 22:39:26 localtime ?