I had a Ubuntu 18.04.1 machine dual boot with Windows 10, and these two OS has time conflict. Previous on my machine with ubuntu 16.04 this conflict can be easily solved with timedatectl set-local-rtc 1 — adjust-system-clock
, but this command does not work any more on my Ubuntu 18.04 system.
Here is the terminal output:
yunhui@hp:~$ timedatectl set-local-rtc 1 --adjust-system-clock
yunhui@hp:~$ timedatectl
Local time: Thu 2018-08-02 16:31:58 CST
Universal time: Thu 2018-08-02 08:31:58 UTC
RTC time: Thu 2018-08-02 08:31:58
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: no
systemd-timesyncd.service active: yes
RTC in local TZ: yes
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'.
yunhui@hp:~$ grep -i utc /etc/default/rcS
grep: /etc/default/rcS: No such file or directory
Basically Ubuntu knows I have change to interpret hardware clock as local time, but the RTC time is still Universal time. Also the “rcS” file does not exist, but I have tried manually create the file and write “UTC=no”, still no luck.
Does somebody know how to solve this problem?
Best Answer
An alternative to the method suggested by @PrahladYeri is that instead of brute-changing the RTC time from the BIOS, boot into Windows and let Windows automatically overite the RTC.
Now boot into Windows and in "Change the Date and Time", disable and then again enable "Set time automatically". This should overwrite the local time on the RTC.