centos7时区修改

 timedatectl     -查看时区时间

      Local time: Mon 2018-02-05 09:23:49 UTC
  Universal time: Mon 2018-02-05 09:23:49 UTC
        RTC time: Mon 2018-02-05 09:23:49
       Time zone: Etc/UTC (UTC, +0000)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: yes
      DST active: n/a

 timedatectl set-timezone Asia/Shanghai ----修改为上海时区

 timedatectl     -查看时区时间

Local time: Mon 2018-02-05 17:38:53 CST
  Universal time: Mon 2018-02-05 09:38:53 UTC
        RTC time: Mon 2018-02-05 17:38:54
       Time zone: Asia/Shanghai (CST, +0800)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: yes
      DST active: n/a

  

 timedatectl set-local-rtc 1 # 将硬件时钟调整为与本地时钟一致, 0 为设置为 UTC 时间

 

参考:

http://blog.csdn.net/robertsong2004/article/details/42268701

https://www.jianshu.com/p/3b43f26fbdaf

posted @ 2018-02-05 17:58  litian19870924  阅读(152)  评论(0)    收藏  举报