Edit ICS Invite for Timezone

Hello!

I recently discovered a bug in ICS invites from Microsoft Teams where the time zone identifier (TZID) is listed as "Pacific Standard Time" which is not a valid TZ time zone per this listing.

This usually is not a problem, except that when my CRM application (Daylite) imports this file, it incorrectly shares it with other Calendar applications because of the invalid TZID.

I have asked Marketcircle (who makes Daylite) to fix this, but in the meantime the simple fix would be to edit the ICS to replace the line that says:

TZID:Pacific Standard Time

with a line that says

TZID:America/Los_Angeles

Is there a way to do this easily from Keyboard Maestro with a selected ICS attachment in Mail? I'd love for it to make that change, then open the file with Daylite.

Thank you!

This is not too hard:

  1. Save the Mail ICS attachment to a file with a specified path
  2. Use the KM Search and Replace action with the file path as it source, and this:

Search for:
TZID:Pacific Standard Time

Replace with:
TZID:America/Los_Angeles

Thank you @JMichaelTX!

I'm not quite sure how to get the path into KM. Lets say I have the file saved on my desktop and it is selected in Finder. Is there a way for KM to get the path of the selected file in Finder, read it, make the replacement, and save it?

I feel like I'm close here but not quite there.
Untitled

Yes. You have it in your Macro. The KM Variable "OrigICS" will contain the path of the file.
You just need to change your Search and Replace to operate on a file instead of a variable:

image

1 Like

That worked - thank you!

1 Like