Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
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 :


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

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

sudo ntpdate

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

Your Answer


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.