Re: localtime ?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: James Cloos <cloos(at)jhcloos(dot)com>, 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:58:23
Message-ID: 557A209F.4080408@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 06/11/2015 04:48 PM, James Cloos wrote:
>>>>>> "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.

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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Takashi Ohnishi 2015-06-12 01:22:55 Re: pg_bulkload
Previous Message James Cloos 2015-06-11 23:48:48 Re: localtime ?