1、
https://wenku.csdn.net/answer/89f4b06ee65511edbcb5fa163eeb3507
root@yao-test:~/testmysqlback# cat /etc/localtime
TZif2UTCTZif2UTC
UTC0
查看当前时区
root@yao-test:~/testmysqlback# timedatectl
Local time: Wed 2024-03-27 02:58:44 UTC
Universal time: Wed 2024-03-27 02:58:44 UTC
RTC time: Wed 2024-03-27 02:58:44
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
设置系统时区:
root@yao-test:~/testmysqlback# timedatectl set-timezone Asia/Shanghai
root@yao-test:~/testmysqlback# timedatectl
Local time: Wed 2024-03-27 10:59:41 CST
Universal time: Wed 2024-03-27 02:59:41 UTC
RTC time: Wed 2024-03-27 02:59:41
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
root@yao-test:~/testmysqlback# date
Wed 27 Mar 2024 10:59:45 AM CST
重启时区服务:::
root@yao-test:~/testmysqlback# systemctl restart systemd-timedated.service
root@yao-test:~/testmysqlback# date
Wed 27 Mar 2024 11:00:27 AM CST
列出可用的时区:::
root@yao-test:~/testmysqlback# timedatectl list-timezones
2、
标签:27,testmysqlback,系统,2024,修改,yao,linux,test,root From: https://www.cnblogs.com/yaok430/p/18098506