当前位置:网站首页>RedHat 8 time synchronization and time zone modification

RedHat 8 time synchronization and time zone modification

2022-06-24 04:51:00 HoneyMoose

In the new RedHat 8 Or updated Linux In the version , We can use

timedatectl

To make some modifications to the time related operations .

Set time zone

When the system is initialized , Setting the time is very necessary , You can use the following method to modify the time zone .

for example , If you want to change the time zone to US Eastern time , Run the following command directly :

timedatectl set-timezone America/New_York

That's all right. .

Set up NTP Sync

before , We still need to pack a lot of NTP Service to synchronize time .

Now just run :

timedatectl set-ntp yes

You can set up automatic synchronization .

Is it very convenient .

summary

Can only run 2 To solve the problem of time synchronization and time zone .

[[email protected] ~]# timedatectl set-timezone America/New_York
[[email protected] ~]# timedatectl set-ntp yes

Run the following command to check the status .

[[email protected] ~]# timedatectl status
      Local time: Thu 2021-09-02 15:39:12 EDT
  Universal time: Thu 2021-09-02 19:39:12 UTC
        RTC time: Thu 2021-09-02 19:39:12
       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 2021-03-14 01:59:59 EST
                  Sun 2021-03-14 03:00:00 EDT
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  Sun 2021-11-07 01:59:59 EDT
                  Sun 2021-11-07 01:00:00 EST
[[email protected] ~]# 

Check the current status , Is it more and more convenient .

https://www.ossez.com/t/redhat-8/13714

原网站

版权声明
本文为[HoneyMoose]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/09/20210904093735167q.html