Jump to content
8 posts in this topic

Recommended Posts

When I boot into leopard it changes the system clock to UTC so when I boot back into windows it's wrong. I found this (below) on the forums and wiki but im a real noob at this kind of thing. Can someone give me clear step by step intructions on what to do?

 

I experienced the same problem in Leopard with /etc/rc.local and /etc/rc.shutdown.local being ignored. Studying the Leopard documentation reveals that both /etc/rc* and StartupItems startup/shutdown mechanisms are deprecated. Consequently, I devised the following Leopard-friendly solution to 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.

Okay may be bumping a bit soon but I also wanted to add in some more info. I unhid the sbin folder using this command defaults write com.apple.finder AppleShowAllFiles TRUE and placed/edited the files written in text edit. this didn't work, I think it's something to do the way I placed the /sbin/localtime-toggle file

I don't have time to help you now, but I know I had this problem at first then fixed it with a forgotten kext and modification to either the com.apple.boot.plist or something similar in Nano. I remember that wes one of my first experiences with nano...

 

If you want, you can search the entire community (around 50 sites) with this custom google...

 

http://www.google.com/coop/cse?cx=00948655...297:e41g72sr-ba

 

don't use the insanely mac one as its broken and doesn't show all sites anyway... Hope you find the solution. I may be able to help tomorrow or Wed

zephyroth wrote a little program that will do this for you in a for of installer package.

here's a link : http://www.one4house.com/iamges/Zephyroth_...ime_Fix.pkg.tgz

 

the solution MacUser2525 suggests works on some systems. on mine it does for about two-three hours, then the clock in windows starts going crazy. UTC in windows was abandoned before it was finished and its buggy.

@zarac Thanks! that worked! Very good little program.

@MacUser2525 Since i'm doing this on a family computer I don't want to go mucking around with the main OS

@Scottapotamas I've bookmarked that search so I can use it later, seems very useful!

Umm, that prog.. I installed it after finding the script or kext and removing it in pursuit of a more "retail" system... Does it have a control panel or does it just change the time??? I cannot be bothered booting into win and i know your online!

Umm, that prog.. I installed it after finding the script or kext and removing it in pursuit of a more "retail" system... Does it have a control panel or does it just change the time??? I cannot be bothered booting into win and i know your online!

 

Whoops, missed you yesterday! The program doesn't really have much customization. It will just set the internal clock to UTC on startup and set it to Local time on shut down. It apparently is just an installer for the instructions I quoted.

×
×
  • Create New...