Re: PostgreSQL Timezone and Brazilian DST

From: Yves Dorfsman <yves(at)zioup(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL Timezone and Brazilian DST
Date: 2015-10-28 14:15:10
Message-ID: 5630D86E.3030200@zioup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2015-10-27 20:29, Edson Richter wrote:
> Hi!
>
> Using PostgreSQL 9.3.10 x86_64 Oracle EL7 compiled by gcc (GCC) 4.8.3
> 20140911, installed using yum repository.
>
> In postgresql.conf, I do have:
>
> timezone="America/Sao_Paulo"
>
> Since DST is in place in Brazil, it is enough to "systemctl reload
> postgresql-9.3" to make it effective?
> Or a complete restart is required?

First a side note, if you work with systems and people in more than one time
zone, I strongly recommend and it will make your life much simpler if you
configure all your servers in UTC (looking at logs, reasoning about
automated/cron jobs etc...).

Note that you can set the timezone on a per session basis with `set
timezone="America/Sao_Paulo"`.

Now if you do want to work in local time zone, so America/Sao Paulo in your case:

If the timezone is set correctly, we do not need to re-start anything when the
DST switch happens.

Postgresql will follow the time zone set at the OS level, run the command
`timedatectl` to check if your RedHat is set to what you expect. In postgres,
use `show timezone` and verify that it says "localtime".

If you want postgres to use at a different time zone than the OS, then do
configure timezone in postgresql.conf, and yes you will need to restart
postgres once you have made that change.

--
http://yves.zioup.com
gpg: 4096R/32B0F416

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Dearman 2015-10-28 15:43:55 Waiting on ExclusiveLock on extension 9.3, 9.4 and 9.5
Previous Message Tom Lane 2015-10-28 14:06:08 Re: PostgreSQL Timezone and Brazilian DST