Linux and win dual system time is not unified solution

The reason for this is: Win and Linux different approach to the hardware of the time, a hardware time as local time, while the other is treated as UTC time. Therefore, differences in the use of Windows and Linux will be eight hours in the case of China UTC + 8 time zone.

We want to unify two times the best way is a unified approach to hardware time.
By timedatectl set-local-rtcway of hardware processing commands can be set to local time or UTC time

timedatectl set-local-rtc 1 --adjust-system-clock
timedatectl set-local-rtc 0 --adjust-system-clock

Two command sets whether the hardware clock is set to local time.

use

sudo hwclock -w

Update the hardware time

sudo hwclockYou can view the hardware clock, timedatectlyou can view your local time, UTC time, time zone, time synchronization is turned on and other information. If after a set time is incorrect, you can sync the following command to turn.

sudo systemctl restart systemd-timesyncd.service #开启时间同步服务
sudo timedatectl set-ntp true #开启同步
sudo hwclock -w #更新硬件时间
Published 50 original articles · won praise 32 · views 30000 +

Guess you like

Origin blog.csdn.net/qq_40827780/article/details/103508268