Dual Boot Windows and Ubuntu – Fix time differences between Ubuntu and Windows. How to fix time differences in Ubuntu 16.04 and Windows 10. For a dual boot system, the clock time is off and causes time differences after each system reboot.
The problem arises because, Ubuntu System maintains the clock in universal time (UTC) and Windows System maintains the clock in local time. To fix the time differences, either:
- Disable UTC and use Local Time in Ubuntu
- Make MicroSoft Windows uses UTC
Disable UTC and use Local Time in Ubuntu:
Run the following commands in Terminal to disable UTC and use Local Time in Ubuntu 16.04:
timedatectl set-local-rtc 1 --adjust-system-clock
Now run the command given below to verify/check if Ubuntu system uses Local time:
timedatectl
Warning: The system is configured to read the RTC time in the local time zone. This mode can not be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling ‘timedatectl set-local-rtc 0’.
For older Ubuntu versions (older than Ubuntu 16.04), to disable UTC and ise Local Time, you will need to edit the /etc/default/rcS file and replace UTC=yes with UTC=no.
You can do this manually or using commands. Either open the /etc/default/rcS file in text editor and manually edit the entries or run the command given below to do this automatically:
sudo sed -i 's/UTC=yes/UTC=no/' /etc/default/rcS
Please restart the system once the above command in executed.
Undo changes
To enable UTC and not use Local Time in Ubuntu anymore, run the command given below:
timedatectl set-local-rtc 0
For older Ubuntu versions (older than Ubuntu 16.04), you will have to do it by modifying the entries in the /etc/default/rcS file. Which means, you will have to replace UTC=no with UTC=yes. Similar to above you can do it manually or by running the command given below:
sudo sed -i 's/UTC=no/UTC=yes/' /etc/default/rcS
Please restart the system once the above command in executed.