- Linux store the time on the hardware clock as UTC by default
- Windows store the time on the hardware clock as the local time by default
Since both operating systems access the hardware clock you may encounter problems when you dual boot between them.
A comment for the geeks:
The advantage of having the hardware clock as UTC is that you don’t need to change the hardware clock when moving between timezones or when Daylight Savings Time (DST) begins or ends as UTC does not have DST or timezone offsets.
Changing Windows to use UTC
If you dual boot Windows and Linux/MAC and the clock is messed up after each boot, you should either :
- run regedit
- navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
- add key RealTimeIsUniversal as DWORD and set it’s value to 1.
- disable Windows time service:
sc config w32time start= disabled
You can download a REG script that performs the first 3 steps from here but you will have to perform the last step (disable the service) manually.
Changing Linux to use local time
Pre-Ubuntu 15.04 systems (e.g. Ubuntu 14.04 LTS):
- edit /etc/default/rcS
- add or change the following section
# Set UTC=yes if your hardware clock is set to UTC (GMT) UTC=no
Ubuntu 15.04 systems and above (e.g. Ubuntu 16.04 LTS):
- open a terminal and execute the following command
timedatectl set-local-rtc 1