CentOS更改时区

Centos在安装的时候如果是自动安装,默认的失去并不是中国时区时间需要修改。

  1. 检查现在的时区
[root@localhost ~]# timedatectl 
               Local time: Tue 2020-03-31 16:35:23 CST
           Universal time: Tue 2020-03-31 08:35:23 UTC
                 RTC time: Tue 2020-03-31 08:35:23
                Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
12345678
  1. 更改时区
  • 列出所有可用时区
[root@localhost ~]# timedatectl list-timezones
…
Asia/Samarkand
Asia/Seoul
Asia/Shanghai
Asia/Singapore
Asia/Srednekolymsk
12345678
  • 更改时区
[root@localhost ~]# timedatectl set-timezone Asia/Shanghai
原文地址:https://www.cnblogs.com/cuianbing/p/14207480.html