TZDATA

De Wiki Clusterlab.com.br
Revisão de 13h17min de 16 de janeiro de 2020 por Damato (discussão | contribs)
Ir para navegação Ir para pesquisar

Download Zic File

Install

[root@something tzdb-2019c]# apt install lzip

[root@something tzdb-2019c]# tar --lzip -xvf tzdb-2019c.tar.lz

[root@something tzdb-2019c]# zic southamerica

[root@something tzdb-2019c]# zdump -v America/Sao_Paulo  | egrep "2019|2020"
zdump: warning: zone "America/Sao_Paulo" abbreviation "-03" lacks alphabetic at start
America/Sao_Paulo  Sun Feb 17 01:59:59 2019 UTC = Sat Feb 16 23:59:59 2019 -02 isdst=1 gmtoff=-7200
America/Sao_Paulo  Sun Feb 17 02:00:00 2019 UTC = Sat Feb 16 23:00:00 2019 -03 isdst=0 gmtoff=-10800

Fixing a wrong "/etc/localtime" configuration

#Getting the MD5SUM for the localtime file
$ md5sum /etc/localtime
223e5193e9159b7c911761f4b8257882  /etc/localtime

#Find which zoneinfo has the same MD5SUM
$ find /usr/share/zoneinfo/ -type f -exec md5sum {}  \; | grep 223e5193e9159b7c911761f4b8257882
223e5193e9159b7c911761f4b8257882  /usr/share/zoneinfo/America/Sao_Paulo

#If now results returned. Remove the localtime and create a symbolic link
$ rm /etc/localtime
$ ln -s /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime

Update with repo

Debian like

apt upgrade tzdata

Red Hat like

yum update tzdata