sudo timedatectl set-timezone your_time_zone # sudo timedatectl set-timezone A
对于中国来说都设置为 shanghai
1
sudo timedatectl set-timezone Asia/Shanghai
更改24h/12h格式
1
sudo localectl set-locale LC_TIME=en_GB.UTF-8
不用 sudo 会让你指定id,指定一个用户就行(选择有时间限制,尽快选)
查看时间配置信息
1
$ timedatectl
输出为
1 2 3 4 5 6 7 8
Local time: Wed 2019-01-23 22:45:47 UTC Universal time: Wed 2019-01-23 22:45:47 UTC RTC time: Wed 2019-01-23 22:45:48 Time zone: Etc/UTC (UTC, +0000) System clock synchronized: yes systemd-timesyncd.service active: yes RTC in local TZ: no