quinta-feira, 25 de outubro de 2018

Adjust Daylight Saving Time - Red Hat/CentOS

Adjust Daylight Saving Time - Red Hat/CentOS - Create the file in anywhere:
 # vi Sao_Paulo.zic 
 

Rule    BrazilSP  2018    only    -       Nov     04      0:00    1:00    S
Rule    BrazilSP  2019    only    -       Feb     17      0:00    0       -

# Zone  NAME                    GMTOFF  RULES/SAVE      FORMAT  [UNTIL]
Zone    America/Sao_Paulo       -3:00   BrazilSP        BR%sT

 # zic  Sao_Paulo.zic 
- Check out if the daylight time interval changed in the timezone:
 # zdump -v /usr/share/zoneinfo/America/Sao_Paulo | grep 2018 
- Create a link symbolic
 # ln -sf /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime 
 # env | grep TZ 
- Type the timezone to be used:
 # vi /etc/profile 
 # export TZ=America/Sao_Paulo 
 # source /etc/profile 
Done!! Check if the Daylight is being displayed right!!

Seguidores