Pakistan Summer Time, and NTP on OS X

     I noticed today that, after a major update to OS X along with a security update, the time on the system clock was an hour ahead. In fact, I didn’t pick it up until after I had glanced at the time on my cell phone. When I opened the preferences where different settings related to time and date can be set, I realised that the Network Time Protocol (NTP) had been enabled, which meant that the system was syncing time and date, along with the usual time zone information, from a remote network time server. In my case, that server was, one of three servers in the drop-down list of NTP servers in the preferences to choose from.

     As with the other two, is an NTP server that is managed by Apple themselves. If you travel a lot, or if you are mindful of and in a place where daylight savings time is commonplace, being able to use an NTP server to not worry about having to change time and date is ideal. It is convenient. After all, time is important, and keeping track of time more so.

     Now, I love NTP. It sure beats having to change time manually all the time. But, what if the NTP server you so dearly depend on suddenly starts spewing out incorrect time? Well, you’d eventually notice that, yes, but it would be annoying. The emails you send are suddenly ahead of time, the IM messages you receive as well, your calendar events, etc. If the difference in time due to the error is subtle, say, maybe off by an hour or so, you will likely take longer to spot it. Not that your house will burn down, or your business will plummet in a downward spiral into loss, but it sure will cause problems, even if little, annoying ones.

     So, why am I here on a hot Saturday afternoon with no mains power, talking about all this? Because I found out today that is giving out a time for Pakistan that is +6 GMT, when it should correctly be +5 GMT. Judging from the label “Pakistan Summer Time” that the NTP server is using to describe the time, I can understand where this skew in time is creeping in from. But it is wrong. And the time on my system is wrong. What’s worse is that the place in system preferences where date and time settings are, does not provide an option for me to use a custom NTP server of my own choosing. I am restricted to choosing from the drop-down of three NTP servers, only one of which applies to my time zone. Bugger!

     Until I found /etc/ntp.conf This small text file stores the address of an NTP server to use. Regardless of whether you have NTP time enabled in the preferences pane, you will have an existing entry in the file. If you change the address in there to point to something, say,, the system will use the new NTP server. In the preferences, the NTP server you added will automatically be selected for you, even though, if you pull the drop-down, you won’t notice it in the choices available.

     The only problem is, also has Pakistan time pinned down at +6 GMT. Square one!

10 thoughts on “Pakistan Summer Time, and NTP on OS X

  1. Pingback: Pakistan Summer Time, and NTP on OS X | Tea Break

  2. It’s not the ntp server’s fault. You have a timezone file on your computer somewhere that has the wrong setting. It’s not Apple’s fault (well, sort of); other operating systems ran into the same problem for a short while.

    If you search around your filesystem, you might find a file named ‘asia’. If it’s there, just make a copy, edit it and fix the daylight savings entry for this year (search for ‘Pakistan’). Then, type “sudo zic /path/to/asia” and “sudo cp /usr/share/zoneinfo/Asia/Karachi /etc/localtime”.

    If it’s not there, grab the asia file off a Linux box.

    I haven’t tested this on OS X, but I’ve used this method on Solaris, Linux, and FreeBSD.

  3. Gentlemen,

    Any ideas where i can find the ‘Asia’ file in Snow Leopard? and which software can be used to edit it?

  4. Pingback: Pakistan Summer Time, and NTP on OS X | Tea Break

  5. Countries in GMT+5 Time Zone

    The following counties use GMT+5 as their Time Zone. NB No Summer Time / Daylight Saving Time is used.

    Maldives, Pakistan, Tajikistan, Turkmenistan, Uzbekistan

    setting the timezone from above into your iphone or ipod will also make your life easier when you sync :)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s