On 06/11/2015 04:48 PM, James Cloos wrote:
>>>>>> "TL" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>
> TL> AFAIK, [localtime] is not a valid value for timezone, unless someone
> TL> has stuck a file by that name into your zoneinfo database directory
> TL> (which I think is standard practice on some distros though by no
> TL> means all). If so, it would mean whatever the file said, which
> TL> would very likely not be UTC.
>
> localtime is also the result is there on all of my debians. But every
> other one defaults to 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'
>
> TL> Evidently that grep has little to do with your actual configuration
> TL> source. This would likely be informative as to where "localtime"
> TL> is coming from:
>
> TL> select * from pg_settings where name = 'TimeZone';
>
> That command says sourcefile is /etc/postgresql/9.3/main/postgresql.conf,
> which is what I grep(1)ed.
What does source from 'select * from pg_settings where name =
'TimeZone';' show?
>
> As it turned out, writing that reminded me that I hadn't run pg_upgradecluster
> on that box. So I did so. And the 9.4/main cluster defaults to UTC as I
> prefer.
>
> The only difference between the results of that pg_settings select
> bewteen the two clusters is 9.3 vs 9.4 in the name of the sourcefile.
>
> I restarted the 9.3 cluster to try that select, and it still prefers -04.
>
> Diff(1)ing the /etc/postgresql/9.[34] directories doesn't show any
> relevant differences. Just directory names and the port number.
>
> I'll leave the old cluster stopped but around for a while in case there
> are any other queries which might explain the differences.
>
> -JimC
>
--
Adrian Klaver
adrian.klaver@aklaver.com