在 Ubuntu 下, 執行下列指令:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install ntpdate | |
sudo ntpdate time.windows.com | |
sudo hwclock --localtime --systohc |
前兩行指令是讓 Ubuntu 自動向 NTP (Network Time Protocol) server 取得正確的時間.
第三行指令是讓 Ubuntu 把正確的時間寫到 Hardware Clock, 讓 Windows 可以從 Hardware Clock 讀到正確的時間.
參考文章
如何解決 Linux (Ubuntu) 與 Windows 雙系統產生的時間不同步 (時差) 問題?