Bootcamp Time Difference Between Mac OS And Windows

This is what you need to do in order to fix the time when booting in Mac OS:

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


to_utc() {
echo "localtime-toggle: Toggling to UTC."
date -f %m%d%H%M%Y `date -u +%m%d%H%M%Y`

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

trap 'to_localtime; exit' term
{ while true; do sleep 86400; done; } &

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" "">
<plist version="1.0">

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.

1 Comment

  1. A less-intrusive solution is to set a registry setting in Windows to allow it to use a UTC system clock:

    This way it will work in both Windows and Mac without any further alteration (albiet with a known bug during daylight saving changeover).

Leave a Reply

Your email address will not be published. Required fields are marked *