2

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 ..)

2
  • 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, 2010 at 19:51
  • what can I say ... guilty as charged! :-)
    – lexu
    Feb 13, 2010 at 22:07

2 Answers 2

1

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.

1
  • 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, 2010 at 15:32
2

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 !

1
  • +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, 2010 at 19:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .