0

I am working on a project where we send appointment invites to various users. It has all the normal bells and whistles that most calendar apps have. Our user base is mostly Outlook users, but we do have some who use Gmail and Yahoo and others. Most of what we have works, but there are a few nuances that don't work or only work for certain mail readers. Among the issues we have are:

  • All day events not displaying correctly (It blocks out the whole day instead of having a notice at the top of the day)
  • Meeting cancellations not being honored (the original meeting shows up on the calendar, but the cancellation request is not recognized by the mail reader. For example, if I create an event and send it to both a Hotmail and Gmail user, that event is recognized by both. If I send a cancelation for that event to both Hotmail and Gmail, Hotmail will properly remove the event but Gmail says the cancelation email is in an unrecognizable format).
  • All day events in different timezones span multiple days (due to what I assume is a timezone adjustment)

I'm able to fix every one of these (and other issues) for myself. But, when I try to fix them all, I break something somewhere else. Also, what I fix for myself might not work for another user who has the same email reader.

I have gone online and tried to find a guide for creating ICS files. Most places say to create a calendar event in one of the main mail readers, and then look at the ICS file it generates. I've done that and have been able to get partial success, but once again, not all fixes work for everyone.

I'm assuming the individual mail settings for each user to at least be part of the problem.

I am going in circles at this point. I have an idea on how a lot of the fields in the ICS file work and what they do. But there are some I don't understand, and I'm not sure if different mail readers intepret them differently.

I have checked here and other sites for some insights on how to fix these issues, but I must say, I get a lot of conflicting information.

I've sent calendar invites from both my personal Hotmail and Gmail accounts. Everything I send from those mail readers work perfectly fine. When I try to incorporate the ICS files generated into my project, I get some issues. That leads me to believe that 1) I can find a solution that works for the major mail readers and 2) That I have a lack of understanding on some fields in the ICS file and must make a change (though I don't know what that change is).

So I'm not asking for a specific fix (although I can post what I have and try to tweak from there.). What I really need is a good guide that gives some insight into how and what these fields do. I've looked at the RFC for ICS files...that's 170 pages, and tells about specific fields, but not about the process in general.

One other thing, I have seen ICS and iCalendar used rather interchangeably. Is there an important distinction?

Tony
  • 11
  • 2
  • For all day, are you using DATETIME or DATE ? https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.4 – anmari Jun 20 '21 at 01:23
  • For cancellations, do you have methods of request then cancel, matching UID, updated sequence #, LAST-MODIFIED, ORGANIZER and ATTENDEEs specified? – anmari Jun 20 '21 at 01:32
  • For timezone related dates, of course if specified in a timezone eg midnight to midnight then when viewing in another timezone they will start on one day and end in another. If that is not intended, then either for birthdays eg, use DATE not DATE-TIME or if intended to be local or floating time then use Form 1: https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.5 – anmari Jun 20 '21 at 01:41
  • Finally check that your ics files are as valid as possible. There are a number of ics validators out there, none are perfect and they can report different errors, so check with all of them. – anmari Jun 20 '21 at 01:42
  • I'm using DTSTART/DTEND in most places and some DTSTAMP (I inherited this code, so not sure why one was used and not the other). Not using DATETIME nor DATE anywhere. For cancellations, we do have matching UID's, sequence is being properly updated, we have organizer, the methods are first Request and then Cancel. We do not specify LAST-MODIFIED nor ATTENDEEs – Tony Jul 07 '21 at 19:50
  • Tony, please read the links I provided above carefully, and strive to understand the components of the RFC 5545 specification. https://datatracker.ietf.org/doc/html/rfc5545#page-2 every event MUST have a DTSTART. DTSTAMP is NOT an alternative, it is a creation date. EVERY DTSTART will be either of type DATETIME or DATE. These bits of knowledgeable are crucial. – anmari Jul 08 '21 at 07:38
  • I've followed that RFC, and was able to write an ICS file that creates a regular (not all day) event in multiple readers...and I was able to create an ICS file that deleted the event. So now I'm trying to create an all day event. What are the major changes for that? I tried using just a DATE and not a DATE-TIME for DTSTART and DTEND, but that didn't quite work. The RFC doesn't mention anything for an all day event (unless I didn't use the proper search term). – Tony Jul 08 '21 at 20:01
  • The spec doesnt explicitly explain all day. Try DTSTART with DATE and then use DURATION of 1 day. DTEND for all days can confuse people because technically an all day ends on the next day. There are several posts on stack about all day and differences with DATE and DATETIME. Try "ics all day" in the search bar. Some: https://stackoverflow.com/questions/33120229/all-day-appointment-for-ics-calendar-file-wont-work. other links: https://stackoverflow.com/questions/29075038/all-day-events-in-ics-feed-published-incorrectly-by-exchange-2010 – anmari Jul 09 '21 at 10:12
  • more - there are heaps https://stackoverflow.com/questions/1716237/single-day-all-day-appointments-in-ics-files – anmari Jul 09 '21 at 10:13
  • Thanks for all the advice here. I was able to resolve the issue and close about 8 different tickets in the process. – Tony Aug 12 '21 at 04:17
  • I developed an web application that providing iOS/MacOS/Gmail/Outlook/Outlook365 ics file and related links. https://calex.link – Ali SadeghipourKorabaslo Mar 08 '22 at 18:22

0 Answers0