修改Linux的時區,RedHat 7

甲骨文技術支援發表於2018-01-09

作業系統是:

  1. Red Hat Enterprise Linux Server release 7.4 (Maipo)
檢視目前的時區

  1. [root@ip-172-31-29-22 sysconfig]# timedatectl
          Local time: Tue 2018-01-09 08:01:21 UTC
      Universal time: Tue 2018-01-09 08:01:21 UTC
            RTC time: Tue 2018-01-09 08:01:20
           Time zone: UTC (UTC, +0000)
         NTP enabled: yes
    NTP synchronized: yes
     RTC in local TZ: no
          DST active: n/a
修改時區:

  1. [root@ip-172-31-29-22 sysconfig]# timedatectl set-timezone Asia/Shanghai
檢視修改後的時區:

  1. [root@ip-172-31-29-22 ~]# timedatectl
  2.       Local time: Tue 2018-01-09 16:04:55 CST
  3.   Universal time: Tue 2018-01-09 08:04:55 UTC
  4.         RTC time: Tue 2018-01-09 08:04:54
  5.        Time zone: Asia/Shanghai (CST, +0800)
  6.      NTP enabled: yes
  7. NTP synchronized: yes
  8.  RTC in local TZ: no
  9.       DST active: n/a





來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20893244/viewspace-2149925/,如需轉載,請註明出處,否則將追究法律責任。

相關文章