解决双硬盘 WIN 10 和 Ubuntu 时间不一致

403 阅读1分钟

解决双硬盘 WIN 10Ubuntu 时间不一致


1. 问题描述

装在双硬盘中的两个系统,WIN 10 时间总是不对,而 Ubuntu 没什么问题。


2. 软硬件环境:

  • WIN 10 位于固态硬盘
  • Ubuntu 18.04.2 LTS 位于机械硬盘

3. 解决方案

分五步走:

  1. sudo timedatectl set-local-rtc 1
  2. sudo apt install ntpdate
  3. sudo ntpdate time.windows.com
  4. sudo hwclock --localtime --systohc
  5. reboot

详情大致如下:

jpch89@jpch89-Ubuntu:~$ sudo timedatectl set-local-rtc 1
[sudo] jpch89 的密码: 
jpch89@jpch89-Ubuntu:~$ sudo apt install ntpdate
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
ntpdate 已经是最新版 (1:4.2.8p10+dfsg-5ubuntu7.1)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
jpch89@jpch89-Ubuntu:~$ sudo ntpdate time.windows.com
23 Jun 12:17:03 ntpdate[3876]: adjust time server 13.70.22.122 offset 0.069351 sec
jpch89@jpch89-Ubuntu:~$ sudo hwclock --localtime --systohc
jpch89@jpch89-Ubuntu:~$ reboot

4. 参考资料


完成于 2019.6.23