6

In Brazil, this year, the president decided we should not have daylight saving. And because of that my Centos 8 server is with the time wrong, I mean, when I use date the time shown is wrong by 1 hour. Usually, when I set my server I execute this:

ln -s /usr/share/zoneinfo/Brazil/East /etc/localtime

The Brazil East timezone is now -3, but using the file above the timezone gets -2 (because for some reason it's wrongly believing we should have daylight saving this year, as it has always been).

So how do I fix this? Is there a way I can tell my server to update the zoneinfo files based on goverment decisions day by day? Lets supose the brazilian President today decides that we should get into DST tomorrow. Is there an international organization that provides those zone files updated according to local goverment decisions?

obs: I tried nano the file /usr/share/zoneinfo/Brazil/East however weird chars appears on the screen so I gave up editing it.

Samul
  • 308
  • 2
  • 12

2 Answers2

5

Brazil no longer observing DST is in tzdata-2019b circa July. (ICANN, formerly IANA, is the maintainer compiling the changes.)

For some reason, I only find 2019a on the CentOS 8 mirrors. Consider raising the issue in a bug report or mailing list. Upstream RHEL commits to a prompt tzdata release.

Until this is updated, consider picking another city at the same offset, like America/Argentina/Buenos_Aires. (Hopefully both do the sane thing and stay on no DST, but who knows...)

John Mahowald
  • 32,050
  • 2
  • 19
  • 34
  • You suggestion of using Buenos Aires was great! I executed `rpm -q tzdata` and my server returned `tzdata-2019a-1.el8.noarch`. So I am using the `2019a` even after `dnf update --refresh` I am still using `2019a`. I will report as a bug as you said but if you have any other suggestion I would be glad to try! – Samul Dec 09 '19 at 19:20
3

Brazil's DST change was included in TZ version 2019b.

Running yum update tzdata should get you the newest version (which is actually 2019c, but it includes the change you care about).

You can use rpm -q tzdata to check the version you have.

CentOS seems to be running behind on making these updates available - they still only offer 2019a. See https://www.centos.org/forums/viewtopic.php?t=72416 for discussion and https://bugs.centos.org/view.php?id=16702 for the bug report

Moshe Katz
  • 3,112
  • 5
  • 28
  • 43
  • I executed "dnf update tzdata" and it said nothing was updated. So I think I am using the latest version and still the problem persists. When I executed `rpm -q tzdata` it returned "tzdata-2019a-1.el8.noarch". – Samul Dec 09 '19 at 19:16
  • do you know how do I make my tzdata use the 2019c file instead of the 2019a file? Cause no matter what I do, the 2019a file never gets updated! – Samul Dec 10 '19 at 22:32
  • 1
    @Samul I just updated my answer with a link to the CentOS forum. There are two workarounds described there. – Moshe Katz Dec 11 '19 at 00:56
  • Thank you so much!! – Samul Dec 11 '19 at 12:07