Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My MBP currently is not connected to the internet when it is booted. (vacation)

now I notice, that each time I return to OS X after a Bootcamped XP game, my system time is of by an hour. (XP and OS X seem to have a different opinion if the HWclock should run UTC or local time, and no, I don't intend to fight that)

How (bash or apple-script) can I tell my Mac to go fetch the correct time via ntp once it connects to the internet?

I know how to do it using the GUI (and I'd rather not ..)

share|improve this question
2  
I know it looks cliché, but when the topic it's about time, it only concern swiss people (You, Studer and myself) –  Kami Feb 13 '10 at 19:51
    
what can I say ... guilty as charged! :-) –  lexu Feb 13 '10 at 22:07
add comment

2 Answers 2

up vote 1 down vote accepted

I was experiencing the same problem ! I think, I have a better solution :

From my point of view it's better to tell WinXp to use the same time as Mac OS x (UTC) !

To do so, edit the following in the WinXP registry :

HKEY_LOCAL_MACHINE
 SYSTEM
  CurrentControlSet
   Control
    TimeZoneInformation
     RealTimeIsUniversal

and set it to a DValue of 1.

share|improve this answer
    
I didn't know XP could do that .. thought it was one of those cultural difference between XP and OS X. THX! –  lexu Feb 13 '10 at 15:32
add comment

Kami is right, but if you only want to force a ntp update, use the following :

sudo ntpdate 0.ch.pool.ntp.org

You can, of course, change the time server !

share|improve this answer
    
+1 I was indeed looking for the kind of command you supplied .. but since Kami removed the need to take that route by showing me how XP can be told to cooperate, I intend to accept his answer. merci einewäg! –  lexu Feb 13 '10 at 19:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.