Re: localtime ?

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

>>>>> "TL" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.

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
--
James Cloos <cloos(at)jhcloos(dot)com> OpenPGP: 0x997A9F17ED7DAEA6

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-06-11 23:58:23 Re: localtime ?
Previous Message Tom Lane 2015-06-11 22:50:18 Re: localtime ?