Ubuntu和Windows双系统有时差是因为Windows默认使用本地时间(也就是BIOS的时间),Ubuntu把BIOS的时间当作了格林尼治时间,再按照时区进行了偏移。
通过如下设置可以将Ubuntu也设置为使用本地时间:
sudo apt install ntpdate
sudo ntpdate time.windows.com
sudo hwclock --localtime --systohc
Ubuntu和Windows双系统有时差是因为Windows默认使用本地时间(也就是BIOS的时间),Ubuntu把BIOS的时间当作了格林尼治时间,再按照时区进行了偏移。
通过如下设置可以将Ubuntu也设置为使用本地时间:
sudo apt install ntpdate
sudo ntpdate time.windows.com
sudo hwclock --localtime --systohc