Here is is my first Address Book plug-in attempt; I was inspired by the other hints from this site. Actually, this is my first AppleScript as well -- I mostly just copy and paste from other scripts. As seen in the screenshot, this script will display the local time for a contact when you control-click on a special Timezone field.
The first thing you need to do is create the special Timezone field to hold the GMT offset. The best thing I came up with is to add the Related Names field (Card -> Add Field -> Related Names), and then apply a custom label of Timezone to the Friend field (you can remove Assistant, if you want) . I also added this field to the template (Card -> Add Field -> Edit Template) to make it available to all contacts. To use the script, first edit a contact's record, and enter their offset from GMT in the Timezone field -- for example, Eastern Standard Time is currently -5 hours from GMT. Then control-click on the Timezone field, and you'll see the local time in the pop-up menu. The script does not take daylight savings time into account. That, as they say, is left as an excercise to the reader.
It would be great to add a lookup service to convert zip code to time zone, removing the need for the Timezone field. But I just did a quick hack. I hope this helps someone ... I know the hints on this site have helped me, the good ones and the bad!
•
[4,793 views]

