【随手记录】非联网环境下Linux 服务器进行时间校正
1、查看当前时间
date
2、设置系统时间
date -s "20251121 14:38:09"
3、查看硬件时间
hwclock --show
4、修改硬件时间
hwclock --set --date '20251121 14:38:09'
5、硬件时间和系统时间相互同步
hwclock -w //将系统时间同步到硬件时间,或者输入 hwclock --systohc
hwclock -s //将硬件时间同步到系统时间
6、查看硬件时间是否与系统时间一致
hwclock --show && date