Ask AFP548 October 29, 2004 at 5:26 am

Add your own time server

Is there a way to add your own time server to the pop-up menu in the Date & Time preference pane?

I’ve tried entering the IP or DNS name into the preference pane, but it won’t remember it in the menu (when you select a different server it forgets the name of my own server).

Alexander

No Comments

  • You can edit this file with Interface Builder (you need the Apple Developer
    Tools installed):

    /System/Library/PreferencePanes/DateAndTime.prefPane/Contents/
    Resources/DateTime.prefPane/Contents/Resources/English.lproj/
    TimePref.nib

    It’s owned by root:wheel, so you’ll need to change the ownership or
    permissions to edit it, or login as root to edit it.

    Open the nib with Interface Builder, click on the ComboBox, and add another
    value to it. Save your changes, and change the ownership or permissions
    back.

    Good luck

    • Beat me to it. So I’ll just add a few notes:

      1. This is a rather unusual thing for Apple to hardcode something into the
      GUI like this. I’m trying to think of anything else that does this and nothing
      comes to mind. Perhaps someone should file a bug on this.

      2. The absolute easiest way to find things like this is to do a recursive grep. If
      you have the time you can do the whole drive, otherwise go for the usual
      suspects like /var/, /etc/, /Library/ and /System/, in this particular
      example


      sudo grep -r time.apple.com /System/

      Would return something like this:

      Binary file /System/Library/PreferencePanes/DateAndTime.prefPane/
           Contents/Resources/DateTime.prefPane/Contents/Resources/
           English.lproj/TimePref.nib/objects.nib matches
      

      Which would pretty much tell you where to start looking.


      Changing the world, one server at a time.

      Joel Rennich
      http://www.afp548.com

      • The choices that appear in the pop-up menu for the time servers are the only
        thing that are hardcoded in that nib file. The actual setting is not stored in
        that nib file. The settings for the time server are stored in:

        /etc/ntp.conf

        You could certainly write directly to that file to make a change to the time
        server, but it wouldn’t become part of the pop-up menu, which is the
        question that was originally asked. 🙂

  • how do you make your server a time server???

Leave a reply

You must be logged in to post a comment.