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.