linux 系统上的三种时间:
- Real-Time Clock (RTC):硬件集成电路保存的时间,在BIOS界面可以看到;
- Coordinated Universal Time (UTC):UTC在根据时区调整后就是本地时间;
- Local Time:本地时间,系统显示的时间;
$ timedatectl
Local time: 日 2022-06-26 18:49:24 CST
Universal time: 日 2022-06-26 10:49:24 UTC
RTC time: 日 2022-06-26 10:49:24
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: yes
NTP service: inactive
RTC in local TZ: no
Network Time Protocol (NTP):The NTP service runs on UDP Port 123.
NTP 用于调整 UTC
UTC 用于调整 RTC
systemd-timesyncd.service
ntpd
chronyd