debian系统时区快速修改方法

作者:欧阳 发布时间:2022年12月18日 阅读: 1,940 分类:Linux摘要

查看当前时区方法:

root@localhost:~# timedatectl
               Local time: Sun 2022-12-18 16:26:09 CST
           Universal time: Sun 2022-12-18 08:26:09 UTC
                 RTC time: Sun 2022-12-18 08:26:10
                Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: no
              NTP service: n/a
          RTC in local TZ: no

查看正确的时区

root@localhost:~# timedatectl list-timezones |grep Shanghai    #查找中国时区的完整名称
Asia/Shanghai

按照正确的时区命名

root@localhost:~# timedatectl set-timezone Asia/Shanghai     #系统时区设为Asia/Shanghai

设置时间 HH:MM:SS(时:分:秒)

root@localhost:~# timedatectl set-time 16:00:00

设置日期 YYMMDD(年,月,日),注意:仅设置日期会将时间重置为00:00:00

root@localhost:~# timedatectl set-time 2022-12-18

设置日期和时间

root@localhost:~# timedatectl set-time 2022-12-18 16:00:00

如果您还有什么疑惑或建议,欢迎在下方评论区继续讨论。
如果您觉得本文还不错,欢迎分享/打赏本文。当然,如果你无视它,也不会影响你的阅读。再次表示欢迎和感谢!

标签: 时区

添加新评论 »