Supporting time zone changes

Power Manager 3.7 includes immediate time zone support. Previously Power Manager only noticed time zone changes after a restart.

New time zone support in Power Manager 3New time zone support in Power Manager 3

I first noticed the need for time zone support when chatting to a friend who had travelled to San Francisco with his MacBook. He had Power Manager installed, running his daily schedule. Greg was surprised to be woken at an uncommonly early hour in the morning by his MacBook's start up chime.

Greg's Mac's time zone had changed but the MacBook had yet to be restarted. Time zone changes do not get passed to running applications. There are a couple of exceptions, such as the menu bar clock and other core Apple software, but third party tools are left unnotified. This makes sense from a paranoid perspective; consider the affect on an accounting package of suddenly having dates and times changing during critical payroll calculations.

It was a month or two later, when I started travelling, before the need to track time zones again reared up. I found myself changing time zones a little too frequently for my schedule's liking. Every time I changed my Mac's time zone, I had to stop and start Power Manager; a less than satisfying process.

Power Manager 2's Location Manager modulePower Manager 2's Location Manager module

I dearly miss the Location Manager from Mac Classic. Location Manager was designed for these situations. In Power Manager 2 we developed our own Location Manager module and time zone changes were handled transparently for you.

What surprised me in Mac OS X, is that Apple has not obviously left in a means for third party software to be informed of date and time changes. To find a solution that allowed immediate notification of time zone changes, Power Manager dives deep into the BSD layer. For a feature that few will notice, time zone support took a fair bit of tinkering.

All that aside, I am pleased to say the final implementation ensures Power Manager tracks your time zone without resorting to polling or other processor-hogging techniques.

This article was posted in and tagged , , , , and .

Published by Graham Miln on