修改Linux的时区,RedHat 7


操作系统是:

  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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/20893244/viewspace-2149925/

你可能感兴趣的:(修改Linux的时区,RedHat 7)