.ics File: VALARM for an allday event dosen´t work - icalendar

I need an ICS-File for a allday event which includes a reminder, one day before the event takes plays.
The ICS-File generates the event without any problem. But the reminder is always set on 18hours, even if the trigger is set on e.g. "-PT15M"....
Can anybody help?
ICS Testfile:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:Karabulut
BEGIN:VEVENT
CATEGORIES:Planing
DTSTART; VALUE=DATE:20200129
SUMMARY: Revenue
METHOD:PUBLISH
CLASS:PUBILC
BEGIN:VCALENDAR
BEGIN:VALARM
TRIGGER:-PT1D
ACTION:DISPLAY
DESCRIPTION:REMINDER
END:VALARM
END:VCALENDAR
END:VEVENT
END:VCALENDAR

This may be the expected behaviour by the receiving application. The 18 hours may be the default set by you or the application.
Many applications do ot let ics files create alarms. I know I would not want the ics file to be creating alarms & notifications for me!
See also
Ical VALARM not registrering and
Sent email with iCal to outlook with valarm reminder and the links in the answers.
The RFC5545 specification See https://www.rfc-editor.org/rfc/rfc5545#page-75 says:
Note: Implementations should carefully consider whether they
accept alarm components from untrusted sources, e.g., when
importing calendar objects from external sources. One
reasonable policy is to always ignore alarm components that the
calendar user has not set herself, or at least ask for
confirmation in such a case.

Related

ics VALARM support across clients

I am wondering about the BEGIN:VALARM value in ics.
I have set an alarm, but Outlook (PC) and Calendar (Mac) seems to ignore the alarm altogether. In eM Client (PC) the alarm is set but cannot be dismissed (pops up again immediately after dismiss)
Is this a known problem with the iCalendar/ics standard?
The format seems to be valid. Are any additional values needed for each client to understand/accept and handle the alert correctly?
I am subscribing to the .ics file via a https:// URL.
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:adamgibbons/ics
METHOD:PUBLISH
X-PUBLISHED-TTL:PT1H
BEGIN:VEVENT
UID:-LovTg9y9HPDCHu8mVnD
SUMMARY:Purjolök
DTSTAMP:20191026T171500Z
DTSTART:20191024T080000Z
DESCRIPTION:En grönsak i lökfamiljen
URL:https://app.myapp.se/r/edit/-LovTg9y9HPDCHu8mVnD
STATUS:CONFIRMED
CATEGORIES:Matlista
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:En grönsak i lökfamiljen
TRIGGER:-PT10M
END:VALARM
DURATION:PT30M
END:VEVENT
END:VCALENDAR
There is most likely nothing wrong with your code and most clients will ignore those alarms by design.
Whether you receive an invitation via email or subscribe to a calendar via http, you don't want the organiser of the meeting/author of the calendar feed to dictate when/if you should be reminded. It is really up to the attendee/subscriber to set their own alarms.
If, on the other hand, you "import" the same ics file, the alarms will be taken into account (the client considers that the stream already belongs to you and that it is a "backup" of your own calendar).

Shows only one VEVENT (first) from many in .ics file

Here is the ICS file content:
BEGIN:VCALENDAR
PRODID:-//Test//Test 1.0//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:Asia/Tokyo
X-LIC-LOCATION:Asia/Tokyo
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP;TZID=Asia/Tokyo:20190108T154626
UID:a0K1I000007ljAxUAI-a0D1I000007daO4UAI
RELATED-TO:a0K1I000007ljAxUAI
DTSTART;TZID=Asia/Tokyo:20190123T080000
DTEND;TZID=Asia/Tokyo:20190123T200000
SUMMARY:XXXXXXXXXXXXXXXXXXXX2
LOCATION:XXXXXXXXXXXXXXXXXXXX2
DESCRIPTION:XXXXXXXXXXXXXXXXXXXX2
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
DTSTAMP;TZID=Asia/Tokyo:20190108T154626
UID:a0K1I000007ljAxUAI-a0D1I000007daNzUAI
RELATED-TO:a0K1I000007ljAxUAI
DTSTART;TZID=Asia/Tokyo:20190110T080000
DTEND;TZID=Asia/Tokyo:20190110T200000
SUMMARY:XXXXXXXXXXXXXXXXXXXX1
LOCATION:XXXXXXXXXXXXXXXXXXXX1
DESCRIPTION:XXXXXXXXXXXXXXXXXXXX1
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
In Thunderbird and Gmail I able to see only first (by order) event. Is this normal behaviour for mail clients, should I create separate .ics file for each VEVENT then and send it with single mail? Thanks in advance for help!
Separate them. I don't know a calendar app that allows one to 'invite' someone to multiple events at the same time. One can of course send a multi event file and ask the user to import it (but for multi events sometimes subscribe is better). If one sends an ics file generated by google calendar, it does the same thing (along with option to download ics file), so nothing to do with your file.
If the need is to have a person see multiple events at a time, a better approach would be to offer them a personal subscribeable ics url. That way they see it separately in their calendar app and it will update/refresh when there are changes.

ics event update failed in web calendar

I am trying to create a ics feed for users to subscribe via webcal. The feed's content comes from database and looks like the following.
When the database is updated, the feed changes and updates the subscribers' calendars. It works fine with google calendar and some calendar apps. However, I never observe updates in outlook.com (the web calendar) or Yahoo calendar. Is there something wrong in the feed so update fail?
The feed is provided through webcal://example.com/subscribe.php
and I put header('Content-Type: text/calendar; charset=UTF-8');
as the first PHP line
ics:
BEGIN:VCALENDAR
PRODID:-//Organisation//Roster//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:Duty Arrangement
X-WR-CALDESC:Duty Arrangement
X-WR-TIMEZONE:Asia/Hong_Kong
REFRESH-INTERVAL;VALUE=DURATION:PT6H
X-PUBLISHED-TTL:PT6H
BEGIN:VEVENT
DTSTART:20180218T020000Z
DTEND:20180218T033000Z
DTSTAMP:20180602T144036Z
UID:228Mip5LyZ5JqY5#organisation.com
DESCRIPTION:Task A
LOCATION:Office
SUMMARY:On Duty
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
DTSTART:20180304T020000Z
DTEND:20180304T033000Z
DTSTAMP:20180602T144036Z
UID:230Mip5LyZ5JqY5#organisation.com
DESCRIPTION:Task B
LOCATION:Office
SUMMARY:On Duty
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR
You have the UID but ICS file events need a SEQUENCE number to indicate which update/version of the event is the latest.
See the specification https://www.rfc-editor.org/rfc/rfc5545#section-3.8.7.4
For recurring event instances, they also need a RECURRENCE-ID of the instance being modified.

Add & Delete an appointment / calendar entry via .ics in Outlook Calendar

PART 1
I am working on an .ics file which generates an event/appointment in Outlook:
BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
STATUS:TENTATIVE
.....
..........
DESCRIPTION:Absence Request
SEQUENCE:0
END:VEVENT
END:VCALENDAR
The user gets the email with the .ics file attached.
When opened, the user gets the following details:
Screenshot of the ics file
Question:
How to disable the .ics so it does not allow to make multiple entries when the exact appointment (date) does exist?
PART 2
Is it also possible to delete an entry from the Outlook Calendar via the .ics file? I have tried with the following code but it does not work:
BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
METHOD:CANCEL
STATUS:CANCELLED
.....
..........
DESCRIPTION:Absence Request
SEQUENCE:1
END:VEVENT
END:VCALENDAR
The cancel meeting button responds but does not actually remove the entry from the Calendar. Yes, the user can go manually and delete it from the calendar - which works fine but thought there may be an option to do via the .ics file.
I also read about the UID having to match the event but this is where I am also lacking of expertise of how to pull it from there.
Any ideas or suggestions ?
Bucki, This is the difference between importing events and subscribing to a calendar (even one with one event only).
When people click on an actual ics file, calendar apps will 'import' the event/s. I think these days some have the smarts to check the UID and not duplicate but many do not. It depends on the app how well they attempt to detect a duplicate. Strictly speaking one is just importing the data into one's own event in a calendar which one can then edit as one pleases.
If an ics URL is sent (not the actual file) most apps will 'subscribe' to the URL. IE: they will create a separate calendar in the individuals calendar app. The app will check for updates on that ics url regularly. In that case the UID and SEQUENCE can be used to indicate a later update. These are not editable by the user.

iCal file for Google Calendar with guests getting email reminders

I'd like to set up a script to produce weekly event ICS files that include guests and reminders for them a few days in advance. I created an event in Google Calendar and tried to copy what it produced, but it didn't work. Here's what I tried:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Urbina//Personal//EN
BEGIN:VEVENT
DTSTART:20151011T160000Z
DTEND:20151011T170000Z
DTSTAMP:20151006T172727Z
ORGANIZER;CN=Me Dude:mailto:urbancenturion#gmail.com
UID:urbancenturion#yahoo.com0005
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;CN=urbancenturion#hotmail.com;X-NUM-GUESTS=0:mailto:urbancenturion#hotmail.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;CN=urbancenturion#yahoo.com;X-NUM-GUESTS=0:mailto:urbancenturion#yahoo.com
LOCATION:Kaos
SUMMARY:event led by two people
END:VEVENT
END:VCALENDAR
There may even be a problem with the line breaks, but they won't render properly in the code window--since I clearly don't know what I'm doing here (new-ish guy).
Edit:
Oops, right and right.
What I wanted was for the two people to be indicated as guests and for there to be a reminder e-mail sent to them 4 or 5 days before the event. (I would produce the event files for each week, all at the same time, months in advance, and import them so I don't have to manually enter them each week.) The event is created, but the 'guests' don't appear. I am assuming the e-mails won't be sent either in that case.
Before BEGIN:VEVENT you need to have METHOD:REQUEST