Jump to content
Welcome to InsanelyMac Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


Fixing Time Synchronization

11 posts in this topic

Recommended Posts

Most people have probably noticed how the clocks of OS X and Windows (at least, windows xp, i don't know about vista) are always wrong after rebooting from one OS into the other (unless you live at GMT). This is because of the way OS X and Windows read the time from the BIOS.


I found the fix to this problem here, but it doesn't work entirely: http://wiki.osx86project.org/wiki/index.ph...iversal_for_RTC


The first method seemed the best to me, but it had a few issues:


[skip to the dashed line if you just want my final solution. My only new contribution are two modifications to the original procedure detailed in the wiki]


1. The way it works is that on boot OS X sets its own local time to the BIOS time (what OS X thinks is UTC). On shut down, OS X then sets UTC to be the current time, so that the BIOS clock will match local time (in other words, it saves local time into the BIOS). This probably seems a little confusing, so here's an example:


Let's say we're in GMT -5 (aka U.S. Eastern Time). Booting up the comp, the BIOS reads 11:00 AM. Starting up OS X, the date command is run -> 11:00 AM becomes local time. Without that date command, OS X would think that is 6:00 AM. Anyway, we do our stuff, then restart the comp to use Windows. Let's say its 11:10 AM at this point. If OS X shows 11:10 AM, that means in the BIOS right now it reads 4:10 PM. The second date command sets the BIOS time to 11:10 AM. Without this date command, Windows would show the time as 4:10 PM instead of 11:10 AM.


The issue is that the date commands on the wiki don't set seconds. If it is 11:00:55 in the BIOS, the first date command makes it 11:00:00 in OS X. Of course, this isn't a huge problem, but it annoyed me.


2. If you leave automatic time synchronization enabled in OS X, it seems sometimes the synchronization will run before the first date command while booting. This causes time to actually get further messed up. Example: It is 11:00 AM in the BIOS. OS X synchronizes to 11:00 AM local time before the first date command is run, which means it is now 4:00 PM in the BIOS. the date command then runs, setting local time to match BIOS time, which means OS X now displays 4:00 PM when it is really 11:00 AM.


Anyway, fixing the second issue is easy; just turn off time synchronization in OS X. However, without fixing the first issue, this means that with enough reboots the time will be significantly off. I managed to figure out modifications to the two date commands that will allow them to set seconds as well, fixing the first issue.



-Open terminal.

-Type "sudo nano /etc/rc.local" without the quotes. The file likely doesn't exist, so you'll be creating a new one.

-paste this line to the file:

date `date -u +%m%d%H%M%Y.%S`

-press Ctrl-O, then enter to save. press Ctrl-X to get back to terminal.


-type "sudo nano /etc/rc.shutdown.local" without the quotes. Again, the file probably doesn't exist.

-paste this line to the file:

date -u `date +%m%d%H%M%Y.%S`

-press Ctrl-O, then enter to save. press Ctrl-X to get back to terminal.


-Turn off automatic time synchronization in OS X under system preferences. We can let windows do the sync'ing, or just manually sync every now and time.


That should be it. Hope it works for you!

Share this post

Link to post
Share on other sites

This problem was addressed by apple almost a year ago in one of the early generations of bootcamp. Just google for a file named appletime.exe (part of bootcamp) and place it in your windows startup folder. That's all there is too it. Times will be synched from now on.

Share this post

Link to post
Share on other sites



I once found an easy installer by Zephyroth that fixed the time sync problem, but I can't seem to find that file anywhere anymore. It worked much better than Appletime.exe, in fact it fixed everything perfectly after installing, only I had to reinstall everything and lost it :P .


Anyone know where I can find this again?





UPDATE: Hey! I found it, and here it is for all of you :D It works awesome, and all you have to do is install it, no scripts, no start-up syncing programs. This file is legit, but if you don't trust me then just don't install it, and use at your own risk!


Share this post

Link to post
Share on other sites

I stumbled on this months ago and then had to use my hard drive to replace a dead one in a laptop. Long story short this saved me most of the hair on my head. Thanks for the post.

Share this post

Link to post
Share on other sites

In my opinion, the best way to fix this issue is this:


Boot into Windows, run regedit, and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation (if the key isn't there, create it)


Add a DWORD "RealTimeIsUniversal" and set its value to 1


Reboot and adjust your time in Windows if it hasn't self-adjusted.


There is no need to do anything else, NTP time syncing will work fine, you can leave it on.


Your BIOS clock will be wrong from now on (leave it wrong) but there will no longer be any time difference between OS X and Windows.


Note that this only works 100% reliably with Windows 7, apparently there are issues when using it with Vista and XP, like wrong time when coming out of standby and other weird things that shouldn't be happening.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.