centos 修改時區以及修正時間


1、查看系統當前的時區

[app@127-0-0-1 shine]$ timedatectl
      Local time: Wed 2019-10-23 17:56:17 CST
  Universal time: Wed 2019-10-23 09:56:17 UTC
        RTC time: Wed 2019-10-23 17:56:15
       Time zone: Asia/Shanghai (CST, +0800)
     NTP enabled: yes
NTP synchronized: no
 RTC in local TZ: yes
      DST active: n/a

Warning: The system is configured to read the RTC time in the local time zone.
         This mode can not be fully supported. It will create various problems
         with time zone changes and daylight saving time adjustments. The RTC
         time is never updated, it relies on external facilities to maintain it.
         If at all possible, use RTC in UTC by calling
         'timedatectl set-local-rtc 0'.
[app@127-0-0-1 shine]$ 

2、修改系統使用的時區

timedatectl set-timezone Asia/Shanghai 

3、時間不准確時校准時間

yum install -y ntpdate
ntpdate us.pool.ntp.org

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM