1.第二天作业:
(1):使用timedatectl查看时间状态:
[root@localhost ~]# clear
[root@localhost ~]# timedatectl status
Local time: Sat 2022-06-04 23:54:44 CST
Universal time: Sat 2022-06-04 15:54:44 UTC
RTC time: Sat 2022-06-04 15:54:42
Time zone: Asia/Shanghai (CST, +0800)
NTP enabled: n/a
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
列出所有已知时区:
timedatectl list-timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Bamako
Africa/Bangui
Africa/Banjul
修改时区为列出时区的某一个:
[root@localhost ~]# set timezones Asia/Shanghai
[root@localhost ~]# timedatectl
Local time: Sun 2022-06-05 00:00:17 CST
Universal time: Sat 2022-06-04 16:00:17 UTC
RTC time: Sat 2022-06-04 16:00:14