I travel for work and change my time zone through my system
preferences. Just recently, Entourage starting changing the way
recurring dates appear on my calendar. For example, a birthday that's
scheduled for Sept. 16th appears on the calendar on the 15th. When I
open the item, it still says the event is scheduled for the 16th. I
want to be able to have my time zone change frequently but not have to
change each event. Any suggestions on how to fix this? I traveled
last year as well and never had any kind of problem.
OK, I'm going to make some assumptions here:
1. You aren't interested in dates in the past - they've gone, does it
really matter how they are displayed?
2. you don't really want to change events that have a start & end time
displayed? I'm assuming that these events happen at a specific time and you
will assign the relevant time zone for those events when you create them.
Since you assign a time for them, that time needs to be adjusted to show the
actual time they take place
3. that leaves us with 'all day events' in the future (or on today)
Fortunately, the power of Applescript will allow us to find these events in
one apple event:
tell application "Microsoft Entourage"
set theEvents to (every event whose all day event is true and start time
„ (get date (date string of (get current date))))
end tell
That's just one line between the 'tell...' and 'end tell' statements.
So, what do we do with these events? Set the time zone to a different value.
Unfortunately, this has to be done one event at a time:
repeat with anEvent in theEvents
set time zone of anEvent to 8
end repeat
Now, the dictionary tells us that 'time zone' is an integer value. Checking
events in my calendar I find that time zone 8 relates to UK London time.
Some experimentation indicates that PDT is time zone 1, Mountain Time is 2,
Central time is 3 etc, so the pattern seems consistent.
So, we can now let the user select which time zone he wants:
set theZone to (word 1 of ((choose from list {"1 PDT", "2 Mountain", "3
Central", "4 ???", "5 ???", "6 ???", "7 ???", "8 UK London"} with prompt
"Select the new time zone for all current & future 'All Day' events") as
string)) as integer
(again, that's all on one line) I'm sure you can guess at the time zones
values for the places you regularly visit.
So, now we have a complete script:
-- Change Time zones for future 'All Day' events v1.0
-- (c) Barry Wainwright 5th September 2005
-- mailto:
[email protected]
set theZone to (word 1 of ((choose from list {"1 PDT", "2 Mountain", "3
Central", "4 ???", "5 ???", "6 ???", "7 ???", "8 UK London"} with prompt
"Select the new time zone for all current & future 'All Day' events") as
string)) as integer
tell application "Microsoft Entourage"
set theEvents to (every event whose all day event is true and start time
„ (get date (date string of (get current date))))
repeat with anEvent in theEvents
set time zone of anEvent to theZone
end repeat
end tell
Click here to load the scrip into Apple's script editor:
http://tinyurl.com/85pqq
Alternatively, if that doesn't work, copy/paste from the script above, but
take care to fix any line-wraps the list processor has put in.
Save the script as a compiled script & put it in the ŒEntourage Script Menu
Items¹ folder in your ŒMicrosoft User Data¹ folder. The script can be
manually run from the menu or called from a Keyboard shortcut if you name
the script appropriately (see the help for more details).