Horário de Verão 2018 [RESOLVIDO]

1. Horário de Verão 2018 [RESOLVIDO]

Jacson
jacsonfh

(usa CentOS)

Enviado em 08/10/2018 - 18:55h

Olá pessoal,
Como nossos estilosíssimos políticos resolveram mudar as datas de horário de verão estou com dificuldade para ajustar o dia e ativar o DST no meu CentOS 7
Acredito que está será a dúvida de muitos nos próximos dias.

Horário de Verão:
Inicio: 00h do dia 18 de novembro de 2018. (Adiantar + 1 hora)
Fim: 00h do dia 16 de fevereiro de 2019. (Retrocedida 1 hora)

Estados afetados Horário de Verão.
São Paulo -3
Rio de Janeiro -3
Espírito Santo -3
Minas Gerais -3
Paraná -3
Santa Catarina -3
Rio Grande do Sul -3
Goiás -3
Distrito Federal -3
Mato Grosso -4
Mato Grosso do Sul -4


Como está o meu linux hoje.
# timedatectl status
Local time: Seg 2018-10-08 18:48:59 -03
Universal time: Seg 2018-10-08 21:48:59 UTC
RTC time: Seg 2018-10-08 21:48:58
Time zone: America/Sao_Paulo (-03, -0300)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: no
Last DST change: DST ended at
Sáb 2018-02-17 23:59:59 -02
Sáb 2018-02-17 23:00:00 -03
Next DST change: DST begins (the clock jumps one hour forward) at
Sáb 2018-11-03 23:59:59 -03
Dom 2018-11-04 01:00:00 -02

Se alguém pude me ajudar?


  


2. MELHOR RESPOSTA

Wesley
wesleysmiranda

(usa Ubuntu)

Enviado em 13/10/2018 - 15:20h

Crie um arquivo com o nome verao2018.zic

# nano verao2018.zic

Copie o conteúdo abaixo:

Rule Brazil 1986 only - Mar 15 00:00:00 0 -
Rule Brazil 1986 only - Oct 25 00:00:00 1 S
Rule Brazil 1987 only - Feb 14 00:00:00 0 -
Rule Brazil 1987 only - Oct 25 00:00:00 1 S
Rule Brazil 1988 only - Feb 7 00:00:00 0 -
Rule Brazil 1988 only - Oct 16 00:00:00 1 S
Rule Brazil 1989 only - Jan 29 00:00:00 0 -
Rule Brazil 1989 only - Oct 15 00:00:00 1 S
Rule Brazil 1990 only - Feb 11 00:00:00 0 -
Rule Brazil 1990 only - Oct 21 00:00:00 1 S
Rule Brazil 1991 only - Feb 17 00:00:00 0 -
Rule Brazil 1991 only - Oct 20 00:00:00 1 S
Rule Brazil 1992 only - Feb 9 00:00:00 0 -
Rule Brazil 1992 only - Oct 25 00:00:00 1 S
Rule Brazil 1993 only - Jan 31 00:00:00 0 -
Rule Brazil 1993 only - Oct 17 00:00:00 1 S
Rule Brazil 1994 only - Feb 20 00:00:00 0 -
Rule Brazil 1994 only - Oct 16 00:00:00 1 S
Rule Brazil 1995 only - Feb 19 00:00:00 0 -
Rule Brazil 1995 only - Oct 15 00:00:00 1 S
Rule Brazil 1996 only - Feb 11 00:00:00 0 -
Rule Brazil 1996 only - Oct 6 00:00:00 1 S
Rule Brazil 1997 only - Feb 16 00:00:00 0 -
Rule Brazil 1997 only - Oct 6 00:00:00 1 S
Rule Brazil 1998 only - Mar 1 00:00:00 0 -
Rule Brazil 1998 only - Oct 11 00:00:00 1 S
Rule Brazil 1999 only - Feb 21 00:00:00 0 -
Rule Brazil 1999 only - Oct 3 00:00:00 1 S
Rule Brazil 2000 only - Feb 27 00:00:00 0 -
Rule Brazil 2000 only - Oct 8 00:00:00 1 S
Rule Brazil 2001 only - Feb 18 00:00:00 0 -
Rule Brazil 2001 only - Oct 14 00:00:00 1 S
Rule Brazil 2002 only - Feb 17 00:00:00 0 -
Rule Brazil 2002 only - Nov 3 00:00:00 1 S
Rule Brazil 2003 only - Feb 16 00:00:00 0 -
Rule Brazil 2003 only - Oct 19 00:00:00 1 S
Rule Brazil 2004 only - Feb 15 00:00:00 0 -
Rule Brazil 2004 only - Nov 2 00:00:00 1 S
Rule Brazil 2005 only - Feb 20 00:00:00 0 -
Rule Brazil 2005 only - Oct 16 00:00:00 1 S
Rule Brazil 2006 only - Feb 19 00:00:00 0 -
Rule Brazil 2006 only - Nov 5 00:00:00 1 S
Rule Brazil 2007 only - Feb 25 00:00:00 0 -
Rule Brazil 2007 only - Oct 14 00:00:00 1 S
Rule Brazil 2008 only - Feb 17 00:00:00 0 -
Rule Brazil 2008 only - Oct 19 00:00:00 1 S
Rule Brazil 2009 only - Feb 15 00:00:00 0 -
Rule Brazil 2009 only - Oct 18 00:00:00 1 S
Rule Brazil 2010 only - Feb 21 00:00:00 0 -
Rule Brazil 2010 only - Oct 17 00:00:00 1 S
Rule Brazil 2011 only - Feb 20 00:00:00 0 -
Rule Brazil 2011 only - Oct 16 00:00:00 1 S
Rule Brazil 2012 only - Feb 26 00:00:00 0 -
Rule Brazil 2012 only - Oct 21 00:00:00 1 S
Rule Brazil 2013 only - Feb 17 00:00:00 0 -
Rule Brazil 2013 only - Oct 20 00:00:00 1 S
Rule Brazil 2014 only - Feb 16 00:00:00 0 -
Rule Brazil 2014 only - Oct 19 00:00:00 1 S
Rule Brazil 2015 only - Feb 22 00:00:00 0 -
Rule Brazil 2015 only - Oct 18 00:00:00 1 S
Rule Brazil 2016 only - Feb 21 00:00:00 0 -
Rule Brazil 2016 only - Oct 16 00:00:00 1 S
Rule Brazil 2017 only - Feb 19 00:00:00 0 -
Rule Brazil 2017 only - Oct 15 00:00:00 1 S
Rule Brazil 2018 only - Feb 18 00:00:00 0 -
Rule Brazil 2018 only - Nov 18 00:00:00 1 S
Rule Brazil 2019 only - Feb 17 00:00:00 0 -
Rule Brazil 2019 only - Nov 3 00:00:00 1 S
Rule Brazil 2020 only - Feb 16 00:00:00 0 -
Rule Brazil 2020 only - Nov 1 00:00:00 1 S
Rule Brazil 2021 only - Feb 21 00:00:00 0 -
Rule Brazil 2021 only - Nov 7 00:00:00 1 S
Rule Brazil 2022 only - Feb 20 00:00:00 0 -
Rule Brazil 2022 only - Nov 6 00:00:00 1 S
Rule Brazil 2023 only - Feb 26 00:00:00 0 -
Rule Brazil 2023 only - Nov 5 00:00:00 1 S
Rule Brazil 2024 only - Feb 18 00:00:00 0 -
Rule Brazil 2024 only - Nov 3 00:00:00 1 S
Rule Brazil 2025 only - Feb 16 00:00:00 0 -
Rule Brazil 2025 only - Nov 2 00:00:00 1 S
Rule Brazil 2026 only - Feb 22 00:00:00 0 -
Rule Brazil 2026 only - Nov 1 00:00:00 1 S
Rule Brazil 2027 only - Feb 21 00:00:00 0 -
Rule Brazil 2027 only - Nov 7 00:00:00 1 S
Rule Brazil 2028 only - Feb 20 00:00:00 0 -
Rule Brazil 2028 only - Nov 5 00:00:00 1 S
Rule Brazil 2029 only - Feb 18 00:00:00 0 -
Rule Brazil 2029 only - Nov 4 00:00:00 1 S
Rule Brazil 2030 only - Feb 17 00:00:00 0 -
Rule Brazil 2030 only - Nov 3 00:00:00 1 S
Rule Brazil 2031 only - Feb 16 00:00:00 0 -
Rule Brazil 2031 only - Nov 2 00:00:00 1 S
Rule Brazil 2032 only - Feb 15 00:00:00 0 -
Rule Brazil 2032 only - Nov 7 00:00:00 1 S
Rule Brazil 2033 only - Feb 20 00:00:00 0 -
Rule Brazil 2033 only - Nov 6 00:00:00 1 S
Rule Brazil 2034 only - Feb 26 00:00:00 0 -
Rule Brazil 2034 only - Nov 5 00:00:00 1 S
Rule Brazil 2035 only - Feb 18 00:00:00 0 -
Rule Brazil 2035 only - Nov 4 00:00:00 1 S
Rule Brazil 2036 only - Feb 17 00:00:00 0 -
Rule Brazil 2036 only - Nov 2 00:00:00 1 S
Rule Brazil 2037 only - Feb 22 00:00:00 0 -
Rule Brazil 2037 only - Nov 1 00:00:00 1 S
Rule Brazil 2038 only - Feb 21 00:00:00 0 -
Rule Brazil 2038 only - Nov 7 00:00:00 1 S
Zone America/Sao_Paulo -3:00 Brazil -03/-02


Realize um backup do arquivo /usr/share/zoneinfo/America/Sao_Paulo:

# cp -v /usr/share/zoneinfo/America/Sao_Paulo /usr/share/zoneinfo/America/Sao_Paulo.bkp

Execute o comando abaixo para gerar as novas regras para o horário de verão:

# zic verao2018.zic

Verifique com o comando abaixo se foram alteradas a data de início do horário de verão para 18 de novembro de 2018:

# zdump -v /etc/localtime | grep 201[89]

Irá aparecer conforme abaixo:

/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 18 01:59:59 2018 UTC = Sat Feb 17 23:59:59 2018 -02 isdst=1 gmtoff=-7200
/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 18 02:00:00 2018 UTC = Sat Feb 17 23:00:00 2018 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 18 02:59:59 2018 UTC = Sat Nov 17 23:59:59 2018 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 18 03:00:00 2018 UTC = Sun Nov 18 01:00:00 2018 -02 isdst=1 gmtoff=-7200

/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 17 01:59:59 2019 UTC = Sat Feb 16 23:59:59 2019 -02 isdst=1 gmtoff=-7200
/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 17 02:00:00 2019 UTC = Sat Feb 16 23:00:00 2019 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 3 02:59:59 2019 UTC = Sat Nov 2 23:59:59 2019 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 3 03:00:00 2019 UTC = Sun Nov 3 01:00:00 2019 -02 isdst=1 gmtoff=-7200

Verifique com o comando timedatectl status que foi alterada a data de início do horário de verão para 18 de novembro de 2018:

# timedatectl status

Sugiro fazer o teste de adiantar a data do relógio para um dia após o dia 18 de novembro para verificar se o horário irá mudar.

Considerações importantes:

Realize primeiramente estes procedimentos em ambiente de testes antes de implantar em produção.
Para restaurar as configurações anteriores, simplesmente reinstale o pacote tzdata com o comando yum reinstall tzdata,
ou simplesmente restaure o backup do arquivo /usr/share/zoneinfo/America/Sao_Paulo.

3. Re: Horário de Verão 2018 [RESOLVIDO]

4. Re: Horário de Verão 2018 [RESOLVIDO]

Wagner
wagnerm25

(usa Red Hat)

Enviado em 10/10/2018 - 09:25h

Pelo menos com relação ao Red-Hat, é só executar " yum -y update tzdata" e o arquivo abaixo será alterado para as datas corretas. PORÉM, ainda não está disponível o patch para o dia 18. Perceba que abaixo o arquivo foi alterado corretamente para o dia 4, que era o que estava valendo até o Temer mudar para o dia 18.

[root@sdcgeo ~]# zdump -v /usr/share/zoneinfo/America/Sao_Paulo | grep 201[8-9]
zdump: warning: zone "/usr/share/zoneinfo/America/Sao_Paulo" abbreviation "-03" lacks alphabetic at start
/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 18 01:59:59 2018 UTC = Sat Feb 17 23:59:59 2018 -02 isdst=1 gmtoff=-7200
/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 18 02:00:00 2018 UTC = Sat Feb 17 23:00:00 2018 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 4 02:59:59 2018 UTC = Sat Nov 3 23:59:59 2018 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 4 03:00:00 2018 UTC = Sun Nov 4 01:00:00 2018 -02 isdst=1 gmtoff=-7200
/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 17 01:59:59 2019 UTC = Sat Feb 16 23:59:59 2019 -02 isdst=1 gmtoff=-7200
/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 17 02:00:00 2019 UTC = Sat Feb 16 23:00:00 2019 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 3 02:59:59 2019 UTC = Sat Nov 2 23:59:59 2019 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 3 03:00:00 2019 UTC = Sun Nov 3 01:00:00 2019 -02 isdst=1 gmtoff=-7200



5. Re: Horário de Verão 2018 [RESOLVIDO]

Jacson
jacsonfh

(usa CentOS)

Enviado em 10/10/2018 - 11:30h

DST active: no
Last DST change: DST ended at
Sáb 2018-02-17 23:59:59 -02
Sáb 2018-02-17 23:00:00 -03
Next DST change: DST begins (the clock jumps one hour forward) at
Sáb 2018-11-03 23:59:59 -03
Dom 2018-11-04 01:00:00 -02

Gostaria de saber como posso mudar essa parte, ativando o DST e mudando o Next DST para outra data.


6. Resolveu.

Jacson
jacsonfh

(usa CentOS)

Enviado em 15/10/2018 - 15:36h


Esta dica deu certo para os meus servidores.

wesleysmiranda escreveu:

Crie um arquivo com o nome verao2018.zic

# nano verao2018.zic

Copie o conteúdo abaixo:

Rule Brazil 1986 only - Mar 15 00:00:00 0 -
Rule Brazil 1986 only - Oct 25 00:00:00 1 S
Rule Brazil 1987 only - Feb 14 00:00:00 0 -
Rule Brazil 1987 only - Oct 25 00:00:00 1 S
Rule Brazil 1988 only - Feb 7 00:00:00 0 -
Rule Brazil 1988 only - Oct 16 00:00:00 1 S
Rule Brazil 1989 only - Jan 29 00:00:00 0 -
Rule Brazil 1989 only - Oct 15 00:00:00 1 S
Rule Brazil 1990 only - Feb 11 00:00:00 0 -
Rule Brazil 1990 only - Oct 21 00:00:00 1 S
Rule Brazil 1991 only - Feb 17 00:00:00 0 -
Rule Brazil 1991 only - Oct 20 00:00:00 1 S
Rule Brazil 1992 only - Feb 9 00:00:00 0 -
Rule Brazil 1992 only - Oct 25 00:00:00 1 S
Rule Brazil 1993 only - Jan 31 00:00:00 0 -
Rule Brazil 1993 only - Oct 17 00:00:00 1 S
Rule Brazil 1994 only - Feb 20 00:00:00 0 -
Rule Brazil 1994 only - Oct 16 00:00:00 1 S
Rule Brazil 1995 only - Feb 19 00:00:00 0 -
Rule Brazil 1995 only - Oct 15 00:00:00 1 S
Rule Brazil 1996 only - Feb 11 00:00:00 0 -
Rule Brazil 1996 only - Oct 6 00:00:00 1 S
Rule Brazil 1997 only - Feb 16 00:00:00 0 -
Rule Brazil 1997 only - Oct 6 00:00:00 1 S
Rule Brazil 1998 only - Mar 1 00:00:00 0 -
Rule Brazil 1998 only - Oct 11 00:00:00 1 S
Rule Brazil 1999 only - Feb 21 00:00:00 0 -
Rule Brazil 1999 only - Oct 3 00:00:00 1 S
Rule Brazil 2000 only - Feb 27 00:00:00 0 -
Rule Brazil 2000 only - Oct 8 00:00:00 1 S
Rule Brazil 2001 only - Feb 18 00:00:00 0 -
Rule Brazil 2001 only - Oct 14 00:00:00 1 S
Rule Brazil 2002 only - Feb 17 00:00:00 0 -
Rule Brazil 2002 only - Nov 3 00:00:00 1 S
Rule Brazil 2003 only - Feb 16 00:00:00 0 -
Rule Brazil 2003 only - Oct 19 00:00:00 1 S
Rule Brazil 2004 only - Feb 15 00:00:00 0 -
Rule Brazil 2004 only - Nov 2 00:00:00 1 S
Rule Brazil 2005 only - Feb 20 00:00:00 0 -
Rule Brazil 2005 only - Oct 16 00:00:00 1 S
Rule Brazil 2006 only - Feb 19 00:00:00 0 -
Rule Brazil 2006 only - Nov 5 00:00:00 1 S
Rule Brazil 2007 only - Feb 25 00:00:00 0 -
Rule Brazil 2007 only - Oct 14 00:00:00 1 S
Rule Brazil 2008 only - Feb 17 00:00:00 0 -
Rule Brazil 2008 only - Oct 19 00:00:00 1 S
Rule Brazil 2009 only - Feb 15 00:00:00 0 -
Rule Brazil 2009 only - Oct 18 00:00:00 1 S
Rule Brazil 2010 only - Feb 21 00:00:00 0 -
Rule Brazil 2010 only - Oct 17 00:00:00 1 S
Rule Brazil 2011 only - Feb 20 00:00:00 0 -
Rule Brazil 2011 only - Oct 16 00:00:00 1 S
Rule Brazil 2012 only - Feb 26 00:00:00 0 -
Rule Brazil 2012 only - Oct 21 00:00:00 1 S
Rule Brazil 2013 only - Feb 17 00:00:00 0 -
Rule Brazil 2013 only - Oct 20 00:00:00 1 S
Rule Brazil 2014 only - Feb 16 00:00:00 0 -
Rule Brazil 2014 only - Oct 19 00:00:00 1 S
Rule Brazil 2015 only - Feb 22 00:00:00 0 -
Rule Brazil 2015 only - Oct 18 00:00:00 1 S
Rule Brazil 2016 only - Feb 21 00:00:00 0 -
Rule Brazil 2016 only - Oct 16 00:00:00 1 S
Rule Brazil 2017 only - Feb 19 00:00:00 0 -
Rule Brazil 2017 only - Oct 15 00:00:00 1 S
Rule Brazil 2018 only - Feb 18 00:00:00 0 -
Rule Brazil 2018 only - Nov 18 00:00:00 1 S
Rule Brazil 2019 only - Feb 17 00:00:00 0 -
Rule Brazil 2019 only - Nov 3 00:00:00 1 S
Rule Brazil 2020 only - Feb 16 00:00:00 0 -
Rule Brazil 2020 only - Nov 1 00:00:00 1 S
Rule Brazil 2021 only - Feb 21 00:00:00 0 -
Rule Brazil 2021 only - Nov 7 00:00:00 1 S
Rule Brazil 2022 only - Feb 20 00:00:00 0 -
Rule Brazil 2022 only - Nov 6 00:00:00 1 S
Rule Brazil 2023 only - Feb 26 00:00:00 0 -
Rule Brazil 2023 only - Nov 5 00:00:00 1 S
Rule Brazil 2024 only - Feb 18 00:00:00 0 -
Rule Brazil 2024 only - Nov 3 00:00:00 1 S
Rule Brazil 2025 only - Feb 16 00:00:00 0 -
Rule Brazil 2025 only - Nov 2 00:00:00 1 S
Rule Brazil 2026 only - Feb 22 00:00:00 0 -
Rule Brazil 2026 only - Nov 1 00:00:00 1 S
Rule Brazil 2027 only - Feb 21 00:00:00 0 -
Rule Brazil 2027 only - Nov 7 00:00:00 1 S
Rule Brazil 2028 only - Feb 20 00:00:00 0 -
Rule Brazil 2028 only - Nov 5 00:00:00 1 S
Rule Brazil 2029 only - Feb 18 00:00:00 0 -
Rule Brazil 2029 only - Nov 4 00:00:00 1 S
Rule Brazil 2030 only - Feb 17 00:00:00 0 -
Rule Brazil 2030 only - Nov 3 00:00:00 1 S
Rule Brazil 2031 only - Feb 16 00:00:00 0 -
Rule Brazil 2031 only - Nov 2 00:00:00 1 S
Rule Brazil 2032 only - Feb 15 00:00:00 0 -
Rule Brazil 2032 only - Nov 7 00:00:00 1 S
Rule Brazil 2033 only - Feb 20 00:00:00 0 -
Rule Brazil 2033 only - Nov 6 00:00:00 1 S
Rule Brazil 2034 only - Feb 26 00:00:00 0 -
Rule Brazil 2034 only - Nov 5 00:00:00 1 S
Rule Brazil 2035 only - Feb 18 00:00:00 0 -
Rule Brazil 2035 only - Nov 4 00:00:00 1 S
Rule Brazil 2036 only - Feb 17 00:00:00 0 -
Rule Brazil 2036 only - Nov 2 00:00:00 1 S
Rule Brazil 2037 only - Feb 22 00:00:00 0 -
Rule Brazil 2037 only - Nov 1 00:00:00 1 S
Rule Brazil 2038 only - Feb 21 00:00:00 0 -
Rule Brazil 2038 only - Nov 7 00:00:00 1 S
Zone America/Sao_Paulo -3:00 Brazil -03/-02


Realize um backup do arquivo /usr/share/zoneinfo/America/Sao_Paulo:

# cp -v /usr/share/zoneinfo/America/Sao_Paulo /usr/share/zoneinfo/America/Sao_Paulo.bkp

Execute o comando abaixo para gerar as novas regras para o horário de verão:

# zic verao2018.zic

Verifique com o comando abaixo se foram alteradas a data de início do horário de verão para 18 de novembro de 2018:

# zdump -v /etc/localtime | grep 201[89]

Irá aparecer conforme abaixo:

/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 18 01:59:59 2018 UTC = Sat Feb 17 23:59:59 2018 -02 isdst=1 gmtoff=-7200
/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 18 02:00:00 2018 UTC = Sat Feb 17 23:00:00 2018 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 18 02:59:59 2018 UTC = Sat Nov 17 23:59:59 2018 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 18 03:00:00 2018 UTC = Sun Nov 18 01:00:00 2018 -02 isdst=1 gmtoff=-7200

/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 17 01:59:59 2019 UTC = Sat Feb 16 23:59:59 2019 -02 isdst=1 gmtoff=-7200
/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 17 02:00:00 2019 UTC = Sat Feb 16 23:00:00 2019 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 3 02:59:59 2019 UTC = Sat Nov 2 23:59:59 2019 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 3 03:00:00 2019 UTC = Sun Nov 3 01:00:00 2019 -02 isdst=1 gmtoff=-7200

Verifique com o comando timedatectl status que foi alterada a data de início do horário de verão para 18 de novembro de 2018:

# timedatectl status

Sugiro fazer o teste de adiantar a data do relógio para um dia após o dia 18 de novembro para verificar se o horário irá mudar.

Considerações importantes:

Realize primeiramente estes procedimentos em ambiente de testes antes de implantar em produção.
Para restaurar as configurações anteriores, simplesmente reinstale o pacote tzdata com o comando yum reinstall tzdata,
ou simplesmente restaure o backup do arquivo /usr/share/zoneinfo/America/Sao_Paulo.





7. Cuidado!

Jacson
jacsonfh

(usa CentOS)

Enviado em 15/10/2018 - 15:44h

Pessoal tem muito site por aí dizendo horário de verão errado.
Olhem em um lugar confiável.
Segue link do órgão responsável.
https://ntp.br 




8. Re: Horário de Verão 2018 [RESOLVIDO]

Thiago Miranda Coelho
thiagomir

(usa Ubuntu)

Enviado em 22/10/2018 - 10:38h

Nos meus servidores ( Red Hat 5.7 ) não deram certo. Estão apresentando o seguinte te erro.

[root@server_01 ~]# vim verao2018.zic
[root@server_01 ~]# zic verao2018.zic
"verao2018.zic", line 107: warning: time zone abbreviation differs from POSIX standard (-03) (rule from "verao2018.zic", line 1)
"verao2018.zic", line 107: warning: time zone abbreviation differs from POSIX standard (-02) (rule from "verao2018.zic", line 2)
[root@srvrjoapp50 ~]# zdump -v /etc/localtime | grep 2018
/etc/localtime Sun Feb 18 01:59:59 2018 UTC = Sat Feb 17 23:59:59 2018 BRST isdst=1 gmtoff=-7200
/etc/localtime Sun Feb 18 02:00:00 2018 UTC = Sat Feb 17 23:00:00 2018 BRT isdst=0 gmtoff=-10800
/etc/localtime Sun Oct 21 02:59:59 2018 UTC = Sat Oct 20 23:59:59 2018 BRT isdst=0 gmtoff=-10800
/etc/localtime Sun Oct 21 03:00:00 2018 UTC = Sun Oct 21 01:00:00 2018 BRST isdst=1 gmtoff=-7200
[root@server_01 ~]#


wesleysmiranda escreveu:

Crie um arquivo com o nome verao2018.zic

# nano verao2018.zic

Copie o conteúdo abaixo:

Rule Brazil 1986 only - Mar 15 00:00:00 0 -
Rule Brazil 1986 only - Oct 25 00:00:00 1 S
Rule Brazil 1987 only - Feb 14 00:00:00 0 -
Rule Brazil 1987 only - Oct 25 00:00:00 1 S
Rule Brazil 1988 only - Feb 7 00:00:00 0 -
Rule Brazil 1988 only - Oct 16 00:00:00 1 S
Rule Brazil 1989 only - Jan 29 00:00:00 0 -
Rule Brazil 1989 only - Oct 15 00:00:00 1 S
Rule Brazil 1990 only - Feb 11 00:00:00 0 -
Rule Brazil 1990 only - Oct 21 00:00:00 1 S
Rule Brazil 1991 only - Feb 17 00:00:00 0 -
Rule Brazil 1991 only - Oct 20 00:00:00 1 S
Rule Brazil 1992 only - Feb 9 00:00:00 0 -
Rule Brazil 1992 only - Oct 25 00:00:00 1 S
Rule Brazil 1993 only - Jan 31 00:00:00 0 -
Rule Brazil 1993 only - Oct 17 00:00:00 1 S
Rule Brazil 1994 only - Feb 20 00:00:00 0 -
Rule Brazil 1994 only - Oct 16 00:00:00 1 S
Rule Brazil 1995 only - Feb 19 00:00:00 0 -
Rule Brazil 1995 only - Oct 15 00:00:00 1 S
Rule Brazil 1996 only - Feb 11 00:00:00 0 -
Rule Brazil 1996 only - Oct 6 00:00:00 1 S
Rule Brazil 1997 only - Feb 16 00:00:00 0 -
Rule Brazil 1997 only - Oct 6 00:00:00 1 S
Rule Brazil 1998 only - Mar 1 00:00:00 0 -
Rule Brazil 1998 only - Oct 11 00:00:00 1 S
Rule Brazil 1999 only - Feb 21 00:00:00 0 -
Rule Brazil 1999 only - Oct 3 00:00:00 1 S
Rule Brazil 2000 only - Feb 27 00:00:00 0 -
Rule Brazil 2000 only - Oct 8 00:00:00 1 S
Rule Brazil 2001 only - Feb 18 00:00:00 0 -
Rule Brazil 2001 only - Oct 14 00:00:00 1 S
Rule Brazil 2002 only - Feb 17 00:00:00 0 -
Rule Brazil 2002 only - Nov 3 00:00:00 1 S
Rule Brazil 2003 only - Feb 16 00:00:00 0 -
Rule Brazil 2003 only - Oct 19 00:00:00 1 S
Rule Brazil 2004 only - Feb 15 00:00:00 0 -
Rule Brazil 2004 only - Nov 2 00:00:00 1 S
Rule Brazil 2005 only - Feb 20 00:00:00 0 -
Rule Brazil 2005 only - Oct 16 00:00:00 1 S
Rule Brazil 2006 only - Feb 19 00:00:00 0 -
Rule Brazil 2006 only - Nov 5 00:00:00 1 S
Rule Brazil 2007 only - Feb 25 00:00:00 0 -
Rule Brazil 2007 only - Oct 14 00:00:00 1 S
Rule Brazil 2008 only - Feb 17 00:00:00 0 -
Rule Brazil 2008 only - Oct 19 00:00:00 1 S
Rule Brazil 2009 only - Feb 15 00:00:00 0 -
Rule Brazil 2009 only - Oct 18 00:00:00 1 S
Rule Brazil 2010 only - Feb 21 00:00:00 0 -
Rule Brazil 2010 only - Oct 17 00:00:00 1 S
Rule Brazil 2011 only - Feb 20 00:00:00 0 -
Rule Brazil 2011 only - Oct 16 00:00:00 1 S
Rule Brazil 2012 only - Feb 26 00:00:00 0 -
Rule Brazil 2012 only - Oct 21 00:00:00 1 S
Rule Brazil 2013 only - Feb 17 00:00:00 0 -
Rule Brazil 2013 only - Oct 20 00:00:00 1 S
Rule Brazil 2014 only - Feb 16 00:00:00 0 -
Rule Brazil 2014 only - Oct 19 00:00:00 1 S
Rule Brazil 2015 only - Feb 22 00:00:00 0 -
Rule Brazil 2015 only - Oct 18 00:00:00 1 S
Rule Brazil 2016 only - Feb 21 00:00:00 0 -
Rule Brazil 2016 only - Oct 16 00:00:00 1 S
Rule Brazil 2017 only - Feb 19 00:00:00 0 -
Rule Brazil 2017 only - Oct 15 00:00:00 1 S
Rule Brazil 2018 only - Feb 18 00:00:00 0 -
Rule Brazil 2018 only - Nov 18 00:00:00 1 S
Rule Brazil 2019 only - Feb 17 00:00:00 0 -
Rule Brazil 2019 only - Nov 3 00:00:00 1 S
Rule Brazil 2020 only - Feb 16 00:00:00 0 -
Rule Brazil 2020 only - Nov 1 00:00:00 1 S
Rule Brazil 2021 only - Feb 21 00:00:00 0 -
Rule Brazil 2021 only - Nov 7 00:00:00 1 S
Rule Brazil 2022 only - Feb 20 00:00:00 0 -
Rule Brazil 2022 only - Nov 6 00:00:00 1 S
Rule Brazil 2023 only - Feb 26 00:00:00 0 -
Rule Brazil 2023 only - Nov 5 00:00:00 1 S
Rule Brazil 2024 only - Feb 18 00:00:00 0 -
Rule Brazil 2024 only - Nov 3 00:00:00 1 S
Rule Brazil 2025 only - Feb 16 00:00:00 0 -
Rule Brazil 2025 only - Nov 2 00:00:00 1 S
Rule Brazil 2026 only - Feb 22 00:00:00 0 -
Rule Brazil 2026 only - Nov 1 00:00:00 1 S
Rule Brazil 2027 only - Feb 21 00:00:00 0 -
Rule Brazil 2027 only - Nov 7 00:00:00 1 S
Rule Brazil 2028 only - Feb 20 00:00:00 0 -
Rule Brazil 2028 only - Nov 5 00:00:00 1 S
Rule Brazil 2029 only - Feb 18 00:00:00 0 -
Rule Brazil 2029 only - Nov 4 00:00:00 1 S
Rule Brazil 2030 only - Feb 17 00:00:00 0 -
Rule Brazil 2030 only - Nov 3 00:00:00 1 S
Rule Brazil 2031 only - Feb 16 00:00:00 0 -
Rule Brazil 2031 only - Nov 2 00:00:00 1 S
Rule Brazil 2032 only - Feb 15 00:00:00 0 -
Rule Brazil 2032 only - Nov 7 00:00:00 1 S
Rule Brazil 2033 only - Feb 20 00:00:00 0 -
Rule Brazil 2033 only - Nov 6 00:00:00 1 S
Rule Brazil 2034 only - Feb 26 00:00:00 0 -
Rule Brazil 2034 only - Nov 5 00:00:00 1 S
Rule Brazil 2035 only - Feb 18 00:00:00 0 -
Rule Brazil 2035 only - Nov 4 00:00:00 1 S
Rule Brazil 2036 only - Feb 17 00:00:00 0 -
Rule Brazil 2036 only - Nov 2 00:00:00 1 S
Rule Brazil 2037 only - Feb 22 00:00:00 0 -
Rule Brazil 2037 only - Nov 1 00:00:00 1 S
Rule Brazil 2038 only - Feb 21 00:00:00 0 -
Rule Brazil 2038 only - Nov 7 00:00:00 1 S
Zone America/Sao_Paulo -3:00 Brazil -03/-02


Realize um backup do arquivo /usr/share/zoneinfo/America/Sao_Paulo:

# cp -v /usr/share/zoneinfo/America/Sao_Paulo /usr/share/zoneinfo/America/Sao_Paulo.bkp

Execute o comando abaixo para gerar as novas regras para o horário de verão:

# zic verao2018.zic

Verifique com o comando abaixo se foram alteradas a data de início do horário de verão para 18 de novembro de 2018:

# zdump -v /etc/localtime | grep 201[89]

Irá aparecer conforme abaixo:

/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 18 01:59:59 2018 UTC = Sat Feb 17 23:59:59 2018 -02 isdst=1 gmtoff=-7200
/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 18 02:00:00 2018 UTC = Sat Feb 17 23:00:00 2018 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 18 02:59:59 2018 UTC = Sat Nov 17 23:59:59 2018 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 18 03:00:00 2018 UTC = Sun Nov 18 01:00:00 2018 -02 isdst=1 gmtoff=-7200

/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 17 01:59:59 2019 UTC = Sat Feb 16 23:59:59 2019 -02 isdst=1 gmtoff=-7200
/usr/share/zoneinfo/America/Sao_Paulo Sun Feb 17 02:00:00 2019 UTC = Sat Feb 16 23:00:00 2019 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 3 02:59:59 2019 UTC = Sat Nov 2 23:59:59 2019 -03 isdst=0 gmtoff=-10800
/usr/share/zoneinfo/America/Sao_Paulo Sun Nov 3 03:00:00 2019 UTC = Sun Nov 3 01:00:00 2019 -02 isdst=1 gmtoff=-7200

Verifique com o comando timedatectl status que foi alterada a data de início do horário de verão para 18 de novembro de 2018:

# timedatectl status

Sugiro fazer o teste de adiantar a data do relógio para um dia após o dia 18 de novembro para verificar se o horário irá mudar.

Considerações importantes:

Realize primeiramente estes procedimentos em ambiente de testes antes de implantar em produção.
Para restaurar as configurações anteriores, simplesmente reinstale o pacote tzdata com o comando yum reinstall tzdata,
ou simplesmente restaure o backup do arquivo /usr/share/zoneinfo/America/Sao_Paulo.









Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts