Changing time zone via applescript

B

Ben

Hi,

I'm one of the - apparently few - people that only get grief from
Entourage's time zone support. All my events are in local time, wherever
that is - that's my choice for simplicity's sake and also a necessity when
synchronizing with a Palm device (My Treo 600 has no time zone support to
start with.)

Now, whenever I travel and change the system clock to reflect my new
location, all times in calendar events past and future change accordingly.
This is madness - and definitely bad design, Microsoft take note of iCal's
handling of the same conundrum.

Anyway, I prefer to use Entourage and my only choice is to change the time
zones of all events via a script every time I move to a different time zone.

tell application "Microsoft Entourage"

set the timezone of the event id eventNum to "Alaska"

end tell

When I try this, I get an error message that entourage "Can't set the
timezone of event xyz to "Alaska".

I can't find Entourage's own "names" for timezones in its dictionary nor via
a google search.

Can anyone steer me in the right direction?

Much appreciated,

Ben
 
P

Paul Berkowitz

I'm one of the - apparently few - people that only get grief from
Entourage's time zone support. All my events are in local time, wherever
that is - that's my choice for simplicity's sake and also a necessity when
synchronizing with a Palm device (My Treo 600 has no time zone support to
start with.)

Now, whenever I travel and change the system clock to reflect my new
location, all times in calendar events past and future change accordingly.
This is madness - and definitely bad design, Microsoft take note of iCal's
handling of the same conundrum.

Anyway, I prefer to use Entourage and my only choice is to change the time
zones of all events via a script every time I move to a different time zone.

tell application "Microsoft Entourage"

set the timezone of the event id eventNum to "Alaska"

end tell

When I try this, I get an error message that entourage "Can't set the
timezone of event xyz to "Alaska".

I can't find Entourage's own "names" for timezones in its dictionary nor via
a google search.

Can anyone steer me in the right direction?


If you look in the Entourage (current version) AppleScript dictionary for
'event', there's no 'timezone' or 'time zone' or any equivalent property.
Therefore you can't do it by AppleScript.

There's a long-standing feature request (mostly from me) for just such an
AppleScript property. It's long overdue (no matter what your time zone). We
are expecting an update to Entourage later this year - if we're lucky
perhaps this might be included. If and when that happens, there's not
usually a great deal of documentation attached, so you might need to
experiment with setting various events to various different time zones and
getting the result in AppleScript. Then you'll be able to see what Entourage
uses as its coding for time zones and will know how to use the feature. All
hypothetical so far, of course ;-)

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
B

Ben

Hi Paul,

Thank you for most informative reply. It's unfortunate that Entourage's
Applescript support doesn't include time zones as what I had in mind would
have resulted in a fairly clean solution to this nasty problem. In fact, I
can't believe so few others seem to be complaining about Entourage time zone
handling.

Possibly Entourage will include time zone handling a la iCal in it's next
iteration?

Looking for an interim solution: I suppose same results could be
accomplished by changing the time of each event via script - adding or
subtracting a corresponding number of hours. Do you think this would be
doable in a way that respects the 24-hour clock? E.g. would adding two hours
to a 23:00 appointment automatically make it a 01:00 appointment of the next
day, etc.

Kind regards,

Ben
 
P

Paul Berkowitz

Possibly Entourage will include time zone handling a la iCal in it's next
iteration?

Looking for an interim solution: I suppose same results could be
accomplished by changing the time of each event via script - adding or
subtracting a corresponding number of hours. Do you think this would be
doable in a way that respects the 24-hour clock? E.g. would adding two hours
to a 23:00 appointment automatically make it a 01:00 appointment of the next
day, etc.

That should work as a workaround - as long as you can keep straight whether
to add or subtract hours! (It's remarkable how so many of us manage to get
that wrong.) You could even make a script to go though all the events whose
start time is within the time period of your visit and add (or subtract) the
2 or whatever hours to start time and end time. Yes, it works fine over
midnight. But note that it wouldn't catch recurring events whose original
occurrence is from an earlier period (and you can't control individual
occurrences of recurring events by script anyway - another feature request
there). So avoid making recurring events for these out-of-town visits -
probably easy enough. Note that birthdays will appear on the wrong day if
they've backtracked though.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
B

Ben

That should work as a workaround - as long as you can keep straight whether
to add or subtract hours! (It's remarkable how so many of us manage to get
that wrong.) You could even make a script to go though all the events whose
start time is within the time period of your visit and add (or subtract) the
2 or whatever hours to start time and end time. Yes, it works fine over
midnight. But note that it wouldn't catch recurring events whose original
occurrence is from an earlier period (and you can't control individual
occurrences of recurring events by script anyway - another feature request
there). So avoid making recurring events for these out-of-town visits -
probably easy enough. Note that birthdays will appear on the wrong day if
they've backtracked though.

Paul, thanks again for very helpful input! I appreciate you pointing out the
recurring event problem. Gee it's so complicated - maybe I'll just do it the
oldfashioned way (from the times when I didn't even know what the "problem"
was) - copy the event data from my palm to Entourage. That works - although
one loses stuff (of which I only use categories.)

I could also imagine a script that encodes categories into DateBK 5 format
(they're stored as little strings of data in the notes field) and back. That
would make life on Palm a bit more colorful, too. But writing this would
take me long days - I'd have to learn applescript first:(

Darn Palm. Darn Entourage. It's not like PIM software is rocket science,
right? :)

Best,

Ben
 
Top