码迷,mamicode.com
首页 > 其他好文 > 详细

Centos7修改系统时区timezone

时间:2018-08-07 16:48:43      阅读:1711      评论:0      收藏:0      [点我收藏+]

标签:ber   查询   mic   修改   zed   padding   enabled   ros   number   

第一步:查询服务器时间

  1. [root@localhost ~]# timedatectl
  2. Local time: Sat 2018-03-31 01:11:46 UTC
  3. Universal time: Sat 2018-03-31 01:11:46 UTC
  4. RTC time: Sat 2018-03-31 01:11:36
  5. Time zone: Universal (UTC, +0000)
  6. NTP enabled: yes
  7. NTP synchronized: yes
  8. RTC in local TZ: no
  9. DST active: n/a

第二步;修改时区为Asia/Shanghai

[root@localhost ~]# timedatectl  set-timezone Asia/Shanghai

第三步:查看修改后的结果

  1. [root@localhost ~]# timedatectl
  2. Local time: Sat 2018-03-31 09:13:21 CST
  3. Universal time: Sat 2018-03-31 01:13:21 UTC
  4. RTC time: Sat 2018-03-31 01:13:11
  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
[root@9c7b1536e1de bin]# date
Tue Aug  7 16:25:19 CST 2018
[root@9c7b1536e1de bin]# 

Centos7修改系统时区timezone

标签:ber   查询   mic   修改   zed   padding   enabled   ros   number   

原文地址:https://www.cnblogs.com/EikiXu/p/9437783.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!