Mac OS X For U

Osx86 Dragon Team


Posted by WinLinMac01 on April 23rd, 2008 in Osx86

It all started when I was finally able to successfully boot between Windows Vista and Mac OS X

Whenever I logged out of Mac OS X, my main BIOS would move the time four hours back. That would also cause my time in Windows Vista to move four hours back as well although “Time Synchronization” was on.

I visited forum-to-forum searching for a solution for this small problem, until I read some users conducting a registry hack and others disabling Time Synchronization. Later did I notice that these solutions were ONLY temporary fixes. That’s when I stumbled upon a permanent fix. I visited the OSx86 Project website and there I found a successful solution for the Time Issue I was facing between Mac OS X and Windows. I was forced to create a new installer package which I did not have the time to make, so I left the job off to Zephyroth who was kind enough to make the installer for me using the commands below:

Leopard: Mac OS X Responsibility

In Leopard, /etc/rc.local, /etc/rc.shutdown.local and StartupItems startup/shutdown mechanisms are deprecated.

Instead, the following Leopard-friendly solution will toggle the clock between local time and UTC at start-up and shut-down times. You will need Administrator privileges when performing this procedure.

1. Create new file /sbin/localtime-toggle with the following contents:

#!/bin/sh
to_utc() {
echo “localtime-toggle: Toggling to UTC.”
date `date -u +%m%d%H%M%Y`
}

to_localtime() {
echo “localtime-toggle: Toggling to localtime.”
date -u `date +%m%d%H%M%Y`
}

trap ‘to_localtime; exit’ term
to_utc
{ while true; do sleep 86400; done; } &
wait

2. Ensure that localtime-toggle is executable:

chmod +x /sbin/localtime-toggle

3. Create new file /System/Library/LaunchDaemons/org.osx86.localtime-toggle.plist with the following contents:

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd“>
<plist version=”1.0″>
<dict>
<key>Label</key>
<string>org.osx86.localtime-toggle</string>
<key>Program</key>
<string>/sbin/localtime-toggle</string>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>HopefullyExitsFirst</key>
<true/>
</dict>
</plist>

4. Reboot.

At this point, your computer’s clock should correctly be set to UTC as Leopard boots, and reset back to local time as Leopard shuts down.

After compiling the programming code above into a small installer package it was only a matter of testing now.

I immediately restarted Mac OS X after installing the package (which can now be found over at the Infinite Mac Forums ) and went back into the same operating system just to confirm that the time was still correct. 

I logged out, restarted, and went into Microsoft Windows, and there I found the correct time sitting on the lower right-hand corner of my screen. This was probably the happiest time of my life. I also confirmed that the time in BIOS was correct and it was. The results were positive. Thus, for those experiencing a similar problem with the time settings, do your self a favor and grab the installer over at this thread and send your worries away! 

Note: It is still safe to enable Time Synchronization on both operating systems. - Enjoy!

0 comments

Post a Comment

Subscribe to: Post Comments (Atom)