#DICA - Alterando o timezone no Oracle Linux 7


Através do comando timedatectl, que interage com o gerenciador de serviços responsável ela configuração da zona de fuso horário no linux é possível consultar o timezone atual. Para isso, basta executar o comando sem passar parâmetros.

[root@prd-app-tasy01 ~]# timedatectl Local time: Tue 2022-03-22 13:09:08 EDT Universal time: Tue 2022-03-22 17:09:08 UTC RTC time: Tue 2022-03-22 17:09:08 Time zone: America/New_York (EDT, -0400) NTP enabled: yes NTP synchronized: yes RTC in local TZ: no DST active: yes Last DST change: DST began at Sun 2022-03-13 01:59:59 EST Sun 2022-03-13 03:00:00 EDT Next DST change: DST ends (the clock jumps one hour backwards) at Sun 2022-11-06 01:59:59 EDT Sun 2022-11-06 01:00:00 EST

Para consultar os timezones existentes:

[root@prd-app-tasy01 ~]# timedatectl list-timezones | grep Paulo America/Sao_Paulo [root@prd-app-tasy01 ~]# timedatectl list-timezones | grep Arg America/Argentina/Buenos_Aires America/Argentina/Catamarca America/Argentina/Cordoba America/Argentina/Jujuy America/Argentina/La_Rioja America/Argentina/Mendoza America/Argentina/Rio_Gallegos America/Argentina/Salta America/Argentina/San_Juan America/Argentina/San_Luis America/Argentina/Tucuman America/Argentina/Ushuaia [root@prd-app-tasy01 ~]#

Para alterar o fuso horario, basta utilizar a opção "set-timezone" seguido do nome da zone desejada. Posteriormente, reiniciar o serviço.

[root@prd-app-tasy01 ~]# timedatectl set-timezone America/Manaus [root@prd-app-tasy01 ~]# timedatectl Local time: Tue 2022-03-22 13:09:32 -04 Universal time: Tue 2022-03-22 17:09:32 UTC RTC time: Tue 2022-03-22 17:09:32 Time zone: America/Manaus (-04, -0400) NTP enabled: yes NTP synchronized: yes RTC in local TZ: no DST active: n/a [root@prd-app-tasy01 ~]# date Tue Mar 22 13:09:38 -04 2022 [root@prd-app-tasy01 ~]#

[root@prd-app-tasy01 ~]#


SHARE

Jhonata Lamim

  • Image
  • Image
  • Image
  • Image
  • Image

0 Comments:

Postar um comentário