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!

The engineer I met, and lost.

     My brother has a desktop PC, a P-IV, which runs Windows XP. One day his system began exhibiting random freezes. He took it to a computer shop nearby where it was diagnosed that the power supply on the chassis had gone south. The replacement supply, costing around 600 PKR including labour, worked well, until after a few months, the same problem resurfaced.

     Suspecting the RAM this time, I ran the memtest application, that runs all sorts of tests on the RAM sticks installed on the system, found on Ubuntu CDs, leaving the application running for hours. Alas, it detected a couple of erroneous memory positions on one of two RAM sticks on board, not really indicating which one. Not having any additional RAM sticks lying around, I could not test to make certain that the problem was indeed without a doubt the faulty stick and which one. I sat down to search for replacement sticks to buy, shocked at the prices of the rather older type of RAM the mother board on the computer could live with.

     As if out of luck completely, before ordering an expensive pair of sticks, I decided on whim to take the computer to the same shop that had replaced its power supply. And as I would realise, I was very lucky I did that.

     If a computer is booted up with no RAM sticks attached, the system, on POST, beeps twice. This combination beep is a signal that the system failed to find any physical memory on the system. And it is a good thing. If the system, for any reason, does not beep with no physical memory attached, then that is an indication something is wrong somewhere on the mother-board.

     That’s what happened at the computer shop when the engineer there tried to start the system without the RAM sticks. When he told me what I hoped not to hear, that there was something amiss with the mother-board, I assumed almost instantly, to my dismay, that there was no way around it but to buy a new mother-board. I think I must have thought out loud, because, to my most pleasant surprise, the guy debunked my assumption, asking me to leave the system at the shop for him to diagnose the problem at leisure. I complied, not having any choice.

     Four hours passed, and he called me to tell me that a couple of ICs on the board around the area where the RAM slots were had burnt out, and that he could fix them for a meagre 400 PKR. Overly ecstatic at the prospect of not having to buy a new mother-board, I got him to reaffirm to me that that would indeed, completely, certainly, fix the problem straight-up.

     When I went to pick up the system, the guy was busy fixing the board in one congested corner of the shop. He had a small desk cluttered with boards, ICs, RAM sticks, and solder dropped from the soldering iron all over. He was perched on his desk, immaculately using a type of soldering equipment I had not seen before: it was a soldering gun, that blew hot air, much like a woman’s hair blower. If you’ve ever used a needle-pin soldering iron, you will quickly understand how difficult it is to use a gun that blows hot air to melt the solder. On a mother board with many, many ICs soldered close to each other, having a gun blowing hot air all over is problematic. But he did it as if it was an every day routine for him. I was impressed. And I was happy.

     He was busy tending to customers, and I couldn’t get him to steal some time to have a chat. I was, though, able to find out that he was an engineering student at a local engineering university in the area, and worked part-time at the shop. He gave me his card, telling me with a smile on his face that I could contact him any time I had a problem. I thanked him profoundly and left.

     A month ago, I was deeply saddened to find out that the shop I had been to was no more there, replaced by another, different shop. And the card he had given me, I was unfortunate and clumsy enough to have misplaced.

     Oh, well.