TZDATA: mudanças entre as edições
Ir para navegação
Ir para pesquisar
Sem resumo de edição |
|||
Linha 16: | Linha 16: | ||
=Fixing a wrong "/etc/localtime" configuration= | =Fixing a wrong "/etc/localtime" configuration= | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
#First check if we need to fix it by comparing the /etc/localtime with the zoneinfo in /usr/share/zoneinfo | |||
#Getting the MD5SUM for the localtime file | #Getting the MD5SUM for the localtime file | ||
$ md5sum /etc/localtime | $ md5sum /etc/localtime |
Edição das 13h18min de 16 de janeiro de 2020
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
#First check if we need to fix it by comparing the /etc/localtime with the zoneinfo in /usr/share/zoneinfo
#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