侧边栏壁纸
博主头像
欧阳博客

行动起来,活在当下

  • 累计撰写 140 篇文章
  • 累计创建 124 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

debian系统时区快速修改方法

欧阳
2022-12-18 / 0 评论 / 0 点赞 / 4 阅读 / 0 字

查看当前时区方法:
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

0

评论区