Re: Determining/Setting a server's time zone

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Madison Kelly <linux(at)alteeve(dot)com>
Cc: postgres list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Determining/Setting a server's time zone
Date: 2009-03-24 02:32:10
Message-ID: 11404.1237861930@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Madison Kelly <linux(at)alteeve(dot)com> writes:
> Server (PostgreSQL 8.1):

> $ date
> Mon Mar 23 20:07:20 EDT 2009
> db=> show timezone;
> TimeZone
> ----------
> GMT
> (1 row)

Hmm. Apparently, this machine is configured so that TZ is set properly
in the environment of user login processes (perhaps in /etc/profile?)
but stuff launched from init sees TZ unset or set to GMT. Messing with
the init environment might break some other program that wants it to be
GMT, so changing postgresql.conf is the best answer.

> My concern with forcing a value in the postgresql.conf file is
> forgetting to update the conf file when EDT/EST changes...

As Scott said, you select a zone specification that is DST-aware;
you don't have to change it every six months, or indeed ever unless
you move.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Aimon Bustardo 2009-03-24 04:51:05 Single missing WAL in long sequence..
Previous Message Scott Marlowe 2009-03-24 00:40:14 Re: Determining/Setting a server's time zone