using terms from application "Address Book" on action property return "related name" end action property on action title for p with e if label of e is equal to "timezone" then set gmt_offset to (((time to GMT) / 60) / 60) set here_time to time of (current date) set addressTZ to value of e as string if gmt_offset < addressTZ then set timeString to " hour(s) ahead" else set timeString to " hour(s) behind" end if set timeDiff to addressTZ - gmt_offset set localTime to here_time + (timeDiff * 3600) set localHours to (round (localTime / 3600) rounding down) set localMinutes to (round ((localTime - (localHours * 3600)) / 60) rounding down) if localHours > 12 then set localHours to localHours - 12 as string end if if localMinutes < 10 then set localMinutes to "0" & localMinutes as string end if return ("local time - " & localHours & ":" & localMinutes & " : " & timeDiff as text) & timeString end if end action title on should enable action for p with e return true end should enable action on perform action for p with e return true end perform action end using terms from