5 Replies Latest reply: Mar 25, 2008 3:10 PM by mlpotgieter
JohnZ Level 1 Level 1 (0 points)
iCal on both Tiger and Leopard always ignores the VTIMEZONE defined in .ical invitations. Instead it appears to rely totally on the TZID value. If the TZID in the invitation does not correspond to one of the names recognised by MacOSX then the time is treated as UTC. This is NOT compliant with rfc2445.

One result of this is that invitations from Outlook or Exchange clients will always be treated as UTC and are placed at the wrong time in iCal.

Awaiting an iCal update.

PowerBook G4, PowerMac G4, iMac G5, Mac OS X (10.4.3)
  • Charlesa8 Level 1 Level 1 (0 points)
    Right. My calendars are a mess due to this issue. I am actually manually editing .ics files as they come into my inbox so they display the proper meeting time(s) in iCal. Otherwise invitations are close to useless.

    The key is setting the TZID so it does NOT define the time zone, but rather hardwires GMT. In the real example below, Exchange defines TZID with as 8 hours ahead of GMT. However, it also says the TZOFFSET is +8 hours. iCal interprets this to mean it needs to add 16 hours to the invite time (TZID +8 plus TZOFFSET +8). Thus the meeting is scheduled for sometime in the middle of the night, which is not the case. It get very confusing very quickly.

    +original Exchange invite+++
    PRODID:Microsoft CDO for Microsoft Exchange
    VERSION:2.0
    TZID:GMT +0800 (Standard) / GMT +0800 (Daylight)
    BEGIN:STANDARD
    DTSTART:16010101T000000
    TZOFFSETFROM:+0800
    TZOFFSETTO:+0800
    END:STANDARD
    +end of Exchange invite+++

    In order to get it to work, I have to edit the TZID to be +0000 as follows:

    +from an edited Exchange invite+++
    PRODID:Microsoft CDO for Microsoft Exchange
    VERSION:2.0
    BEGIN:VTIMEZONE
    TZID:GMT +0000 (Standard) / GMT +0000 (Daylight)
    BEGIN:STANDARD
    DTSTART:16010101T000000
    TZOFFSETFROM:+0800
    TZOFFSETTO:+0800
    END:STANDARD
    +end an edited Exchange invite+++

    Then it loads into iCal 3.0 on OS X 10.5.1 just fine.

    This is not just Exchange invites giving this problem. Lotus Notes invites are also timezone challenged in iCal:

    +from a Lotus Notes invite+++
    BEGIN:VCALENDAR
    X-LOTUS-CHARSET:UTF-8
    VERSION:2.0
    PRODID:-//Lotus Development Corporation//NONSGML Notes 6.0//EN
    METHOD:REQUEST
    BEGIN:VTIMEZONE
    TZID:SE Asia
    BEGIN:STANDARD
    DTSTART:19500101T020000
    TZOFFSETFROM:+0700
    TZOFFSETTO:+0700
    END:STANDARD
    END:VTIMEZONE
    +end of Lotus Notes invite+++

    ICal interprets this example to mean the meeting is +0700 hours ahead of SE Asia (when, in fact, SE Asia is +0700 is offset from GMT). Again, I have to edit the TZID to specify and hardwire +0000 in order for it to load successfully into iCal at the correct time/date.

    +from an edited Lotus Notes invite+++
    BEGIN:VCALENDAR
    X-LOTUS-CHARSET:UTF-8
    VERSION:2.0
    PRODID:-//Lotus Development Corporation//NONSGML Notes 6.0//EN
    METHOD:REQUEST
    BEGIN:VTIMEZONE
    TZID:GMT +0000
    BEGIN:STANDARD
    DTSTART:19500101T020000
    TZOFFSETFROM:+0700
    TZOFFSETTO:+0700
    END:STANDARD
    END:VTIMEZONE
    +end an edited Lotus Notes invite+++

    Now the invite loads successfully into iCal.

    I am looking into automating this with a AppleScript or Automator Action, time permitting. In the mean time, I suggest turning off "Automatically retrieve invitations from Mail" in iCal and just drop the .ics file into TextEdit and edit the file so that TZID:GMT +0000, save it to your desktop, and then double click to load the correct invitation time into iCal. You can delete the .ics on your desktop then (since you loaded it into iCal).

    A bit manual, but I hope this helps!

    Charles
  • TheSeb Level 1 Level 1 (0 points)
    Hi !!

    Did you anage to create an automated tool to fix this problem with incoming invitations ?
  • Ian Wilson4 Level 1 Level 1 (5 points)
    Wow! Way beyond my technical knowledge but at least explains part of my problem:
    When I am sent an invite from a Lotus Notes user, it imports fine into iCal on my Mac (Leopard) and syncs beautifully to other Macs via .Mac

    BUT when I publish online via my iCal.mac.com address the times do exactly what you have outlined.

    When I publish to Plaxo, it is fine. But when Plaxo publishes to Google it goes all, well, "googly" again..

    Is this the same problem as you have described?

    (Oh, and it wont let me edit invited events on my own Mac, eg times, but only allows the "event organiser"... something that my Lotus-user colleagues assure me does not happen on other platforms and it is only iCal that makes this restriction.

    Ian
  • Ben Poole Level 1 Level 1 (5 points)
    Ian Wilson4 wrote:
    (Oh, and it wont let me edit invited events on my own Mac, eg times, but only allows the "event organiser"... something that my Lotus-user colleagues assure me does not happen on other platforms and it is only iCal that makes this restriction.


    Yes, that's a pain -- e.g. I'd like to add alarms to accepted invitations, and I can't. The comment re Lotus Notes isn't strictly true, although I know what they're getting at. Whilst you can edit invites in your Notes mail file even when they didn't originate from you, any changes that the meeting chair makes will over-write yours (if the changes are to the same fields).
  • mlpotgieter Level 1 Level 1 (0 points)
    This is a pain.. I can not believe that Apple have not fixed this in 10.5.2.
    I just switched from Thunderbird/Lightning and shortly afterwards found out these bugs with iCal.
    I put together an Applescript and shell script to automate this. Please note that this is my first applescript and I have only tested this on a few emails.

    First create the following applescript:

    using terms from application "Mail"
    on perform mail action with messages theMessages
    repeat with theMessage in theMessages -- loop through the messages sent by Mail
    set theAttachment to first item of theMessage's mail attachments -- this will crash if there are no attachments in the message
    set theAttachmentFileName to "Macintosh HD:Users:martin:Documents:temp:" & theAttachment's name -- replace quoted text with your desired temp path

    try

    tell application "Finder"
    if exists file theAttachmentFileName then
    delete file theAttachmentFileName -- moves it to the trash
    end if
    end tell


    on error
    display dialog "there was an error"
    end try


    save theAttachment in theAttachmentFileName -- saves the attachment in the designated folder
    set PosixAttachmentName to POSIX path of file theAttachmentFileName
    do shell script "/Users/martin/fixics.sh " & PosixAttachmentName
    tell application "iCal" to open the theAttachmentFileName

    end repeat
    end perform mail action with messages
    end using terms from


    Then create the shell script fixics.sh as follows:

    #!/bin/sh
    ICSFILE=$1

    cat $ICSFILE | sed 's/DTSTART;.:/DTSTART:/' | sed 's/DTEND;.:/DTEND:/' > $ICSFILE

    Then create a rule in Mail.app that looks for email messages with attachments ending in .ics and run the above applescript.

    Hope that helps.. and I hope that apple sort this out with a fix soon.

    sorry for the terrible formating of this post... this is also my first post on the Apple forum.