I currently have a dual-boot setup with Windows Vista and Fedora Linux. The time between the two installations have a 6 hour gap. When I try to set the time of one OS to match the other one, the other OS adjusts its time as well so they never sync. How can I sync their times?
4 Answers
I presume you live in a time zone with a 6-hour offset from UTC (GMT), such as Central Standard Time in the USA is GMT-6. Perhaps you live in Sri Lanka, where the offset is 6 hours the other side of GMT, and the time zone is GMT+6.
Both operating systems need to agree whether the system clock is set to local time or UTC.
This is probably most easily accomplished by telling Fedora to use local time. Windows is generally much harder convince to use UTC.
As suggested on a fedoraforum.org thread, at a Fedora root shell, try:
hwclock --localtime
This should tell Fedora to use treat the system clock as containing the local time, the same as Windows does by default. The operating systems should now agree on the time.
-
"Windows is generally much harder to convince to use UTC." -- This can be achieved by setting the Windows time zone to "Reykjavík, Iceland", which is UTC+0 and does not use daylight saving time.– DevSolarMay 7, 2015 at 7:47
Tell the linux side not to expect that the system clock is using UTC. In Ubuntu (9.10), this is set in /etc/default/rcS
. In RHEL (5u4), this is set in /etc/sysconfig/clock
.
-
1
-
1
-
-
1Open the file in question, change the line that says UTC=true to UTC=false, then reboot. Dec 15, 2009 at 22:55
Yes you should run NTP but not for the reasons stated herein, that will only fix the symptom not the cause. On Linux (as root) run this: hwclock --localtime --systohc
No need to regedit under Windows, no need to reboot.
-
Can you more fully explain your reasoning behind "that will only fix the symptom not the cause"?– MaQleodOct 3, 2012 at 18:47
Check the timezone settings in both installs are the same. It sounds like setting the time on one OS is setting the computer time and the other OS is picking up the computer time but 6 hours adrift.