Debian9修改时区

1、查看机器默认时区

[root@test 18:59:50 ~]# timedatectl
      Local time: Tue 2022-03-08 18:59:55 CST
  Universal time: Tue 2022-03-08 10:59:55 UTC
        RTC time: Tue 2022-03-08 10:59:55
       Time zone: Asia/Shanghai (CST, +0800)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

2、查看可用时区

timedatectl list-timezones 

3、设置时区

timedatectl set-timezone Asia/Shanghai

4、查看现在时区,一种是timedatectl,一种是查看软连接

[root@test 18:51:55 ~]# ls -l /etc/localtime 
lrwxrwxrwx 1 root root 35 Mar  8 18:01 /etc/localtime -> ../usr/share/zoneinfo/Asia/Shanghai

  

  

  

 

posted @ 2022-03-08 19:05  lucky_tomato  阅读(243)  评论(0编辑  收藏  举报