Any Ideas Why The System Clock Is Showing Inaccurate Time Settings - Exactly 4 Hours Ahead Each Time - When I Boot Back Into Windows 7 After I Been Just Running Linux Ubuntu For A Long Period Of Time?

Hello. I have a question to ask you. This in some unusual manner involves two operating systems -- Linux Ubuntu v. 11.10 64-bit and especially Windows 7 64-bit.

Hello.  I have had issues only with my Windows 7 64-bit's "Date and Time" settings not accurate, specifically wrong  time clock issues. Every time I reboot and restart back into my Windows 7 after being many (say over 8) hours on my Linux Ubuntu operating system, I see my Windows 7 clock in my notification area is usual 4 hours ahead of the actual real time where I am -- the eastern United States or the Eastern Time Zone. So if it was 7:02 PM in real time, the computer clock states or shows in the notification area 11:02 PM when I first see when the Windows desktop loads. Some time ago I think I recall I saw a 3 hours ahead of my actual real time. This was only one instance I believe.

This date and time issue does not occur with Linux Ubuntu when I have been on Windows 7 for an extended time period and then I reboot/restart back into Linux Ubuntu. The Ubuntu clock in the upper right corner is always correct. I can be off Windows 7 for several hours and then reboot/restart back into Windows 7 by NEVER being on Linux Ubuntu  WITHOUT any Windows 7 time clock issues.  


To correct this each time, I have to get into the "Date and Time Settings" window -> "Internet Time" -> "Change settings..." -> "Update now".  This works and the actual real time is corrected without any further issues until I repeat the process -- being back on Linux Ubuntu for extended number of hours.  

My hardware and operating system configuration and setup:
This is on a single desktop PC that has a tower system. It has several internal hard drives with one physical hard drive dedicated with its own partition for each operating system -- Windows 7 64-bit and Linux Ubuntu v11.10 64-bit. When each operating system was installed, they were installed on their own hard drives without any other hard drive connected. Therefore there is no shared booting processes happening. The hard drive are always connected via SATA data cables to the motherboard. In order for me to change the operating system, I have to change it in BIOS boot device priority settings to either hard drive that contains the particular operating system.            

The CMOS battery for my motherboard was changed about 5-6 months ago with a new fresh battery if you are thinking my battery is getting weak and causing potential date and time issues. Also, I would think that the weak battery would provide inaccurate clock time issues in Linux Ubuntu as well when it is not.

So any ideas why the system clock is showing inaccurate time settings (exactly 4 hours ahead each time) when I boot back into Windows 7 after I have been just running Linux Ubuntu for a long period of time on the same computer? Whether a thought, suggestion, recommendation, or a fact; please share with me what you think is going on.

Please reply.

Thank you!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hate to ask this but you didn't mention it: Are both Windows and Linux on the same time zone?
BazingerooAuthor Commented:
@ kinecsys:

Hello. Nice to meet you.

Thank you for your comment.

If you are asking if the time zone setting per each operating system is the same time zone which I think you maybe aksing, then yes; both are set to Eastern Time Zone too. I think maybe this is what your previous comment is referring to.  

Please reply.

Thank you!
The BIOS clock is probably the culprit.  Changing the O/S time doesn't necessarily update the BIOS clock.   So make sure that is correct.  Also both operating systems allow you to use internet time server.  So configure nntp services and find a local time server close to you.  This will insure clock is correct.  Then enable & set up windows time service to make it match.  Then both operating systems will have correct time no matter what the BIOS says, and they will be synced up to the same fraction of a second.
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

OK, so if both Operating Systems are configured to the same time zone and the bios time matches as well, then I'm out of ideas. I would try what dlethe proposes and set up the same internet ntp server for both, unless you don't just want to solve the problem but actually figure out what caused it.
You also *really* need to get your boot loader working right so you can freely boot between operating systems w/o going to the BIOS.  Lots of linux freebies out there, plus you could create a boot USB if you don't want to risk screwing things up. Then you boot the USB and select what O/S you want to run and the stick boots the appropriate disk.
Dave BaldwinFixer of ProblemsCommented:
I just booted up my Ubuntu 8.04 system.  The BIOS clock is 7 hours ahead of the screen time.  I believe that is because Linux or at least Ubuntu sets the system clock to GMT and adjusts the displayed time to the time zone.  And since Ubuntu checks with a time server every time it boots up, it will reset the clock every time you boot into Ubuntu.

Yep, just Googled it.  This search will show you several links to make them sync with each other:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BazingerooAuthor Commented:
@ DaveBaldwin, kinecsys, & dlethe:

Hello. Nice to see DaveBaldwin and kinecsys again! Nice to meet dlethe!

Okay, I have read all your comments and they are all strong critical analysis of this issue. I do appreciate all your dedication and attention to detail in your presentation and execution to the resolution of this issue as well.

I will begin by saying that the BIOS clock has no issues. I verified the BIOS clock in BIOS after each reboot cycle of each operating system and alternating the reboot cycle between both operating system too. I see through cause and effect, each time I finished using a Linux Ubuntu session, the clock would adjust the BIOS clock (the effect). Therefore the cause is none other than the operating system Linux Ubuntu. Therefore DaveBaldwin's comment gains validity from his premise as he explains the reasoning. I understand the logic of his statement and therefore went to his solution via the weblink. I see from the choice of solutions are all different to arrive at the same conclusion. The weblinks contain various tutorials or printed steps. From the 'latest' version of Linux Ubuntu I am using (v.11.10), I found that the instructions to this resolution varies a great deal if utilizing the GUI methods provided. None of  the GUI methods 'match' my 'latest' particular GUI distribution of Linux Ubuntu. So I ended up resorting to the text line command in Terminal and using and saving the gedit edit as instructed through this weblink: titled: [HowTo] Fix Time Synchronization issue on dual booting Ubuntu & Windows. The Terminal text line approach is universal and the method is the same regardless of the distribution version of Linux Ubuntu.  It works!

Summary of steps here:

1. Open Terminal in Linux Ubuntu.
2. Enter: sudo gedit /etc/default/rcS
3. Enter your password.
4. In the new window titled: rcS (/etc/default) – gedit -> change the entry: UTC=yes (by default) to: UTC=no
5. Save the gedit file by clicking on: Save .
6. Reboot/restart Linux Ubuntu to set it permanently.
7. Done. Fixed!    

Per the author of the video states his rationale:

"Ubuntu assumes that your hardware clock is set to UTC (Universal Time Coordinated). Windows assumes your hardware clock is set to the local time. Apparently there is no way for Windows to use UTC for the hardware clock. Instead for the hardware clock you can configure Ubuntu to use the local time (like Windows and keep the time in sinc)."

I have tested this solution through a few operating system reboot/restart cycles for each operating system by alternating reboots/restarts and found Windows 7 retains my actual real clock time each time! Hurray!!!

I have learned something extraordinary on this issue here.  

I have awarded DaveBaldwin the full 500 points and the Accepted Solution, since he is the only one that  provided me the direct answer and solution to this issue.

I want to thank everyone for their help with this question/thread!!!! Excellent work!!!

Again, thank you all!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.