Ical import event not working event my ical file has no error - icalendar

I want to import my ical event to google calender, but it is not working, It says 0 events imported, I checked with ical validator, it says no issue with the ical file, can anyone please help me to resolve this issue, here is my ical data
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VTIMEZONE
TZID:America/New_York
BEGIN:STANDARD
LOCATION:Ponton 2 Quilles | Demi-Journée (Avant-midi)
DESCRIPTION:Ponton 2 Quilles | Demi-Journée (Avant-midi)
DTSTART:20190619T070000Z
DTEND:20190619T120000Z
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
SUMMARY:Ponton 2 Quilles | Demi-Journée (Avant-midi)
URL:https://fassettmarine.com
DTSTAMP:20190619T070000Z
UID:5cf75576d13b6
END:STANDARD
END:VTIMEZONE
BEGIN:STANDARD
LOCATION:Test Product For Tako
DESCRIPTION:Test Product For Tako
DTSTART:20190517T160607Z
DTEND:20190518T160611Z
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
SUMMARY:Test Product For Tako
URL:https://fassettmarine.com
DTSTAMP:20190517T160607Z
UID:5cf75576d13b1
END:STANDARD
END:VCALENDAR

It looks like your properties are in random order and missing the BEGIN:VEVENT/END:VEVENT.
iCalendar is following a fixed structure with components as containers for properties (and potentially other components). See https://www.rfc-editor.org/rfc/rfc5545#section-3.6
So you should have something like:
BEGIN:VCALENDAR
... VCALENDAR properties go here
BEGIN:VTIMEZONE
... VTIMEZONE properties go here
BEGIN:STANDARD
... STANDARD properties go here
END:STANDARD
BEGIN:DAYLIGHT
...
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
... VEVENT properties go here
END:VEVENT
END:VCALENDAR
As a matter of fact, since your event seem to be using zulu time, you can even skip the whole VTIMEZONE/STANDARD and simply go for
BEGIN:VCALENDAR
... VCALENDAR properties go here
BEGIN:VEVENT
... VEVENT properties go here
END:VEVENT
END:VCALENDAR

Related

iCal STANDARD or DAYLIGHT error when already defined

I have an iCal file that I am validating here
https://icalendar.org/validator.html?url=https://www.youreontime.com/calendar/syncstaff/d72e6edb-90da-4cc7-86c0-16fee6f3ad2e
It is giving an error At least one STANDARD or DAYLIGHT property must be defined here near line # 4
Here is the file which does have a time zone section at the top.
BEGIN:VCALENDAR
PRODID:-//github.com/rianjs/ical.net//NONSGML ical.net 4.0//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Australia/Sydney
X-LIC-LOCATION:Australia/Sydney
END:VTIMEZONE
BEGIN:VEVENT
ATTENDEE;CN=Adriane Bews;ROLE=REQ-PARTICIPANT:MAILTO:demo#youreontime.com
DESCRIPTION:Walter Jones (Ph 12456788) Dry off. Staff Adriane Bews
DTEND;TZID=Australia/Sydney:20200215T133500
DTSTAMP:20200215T105625Z
DTSTART;TZID=Australia/Sydney:20200215T132000
SEQUENCE:0
STATUS:TENTATIVE
SUMMARY:Walter Jones Dry off
UID:yot-10025135
END:VEVENT
END:VCALENDAR
Craig, Evan pointed you in the right direction.
What the message is saying is that "AT LEAST ONE STANDARD OR DAYLIGHT PROPERTY" must be defined IF one defines a VTIMEZONE. A VTIMEZONE is a full definition of the timezone for the period of your events -ie if there is daylight saving, then one must define when there is a changeover, as per the example
BEGIN:VTIMEZONE
TZID:US-Eastern
LAST-MODIFIED:19870101T000000Z
BEGIN:STANDARD
DTSTART:19971026T020000
RDATE:19971026T020000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19971026T020000
RDATE:19970406T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
END:DAYLIGHT
END:VTIMEZONE
Personally I think it would be great if one were able to assume that both one's own system and the receiving system had the latest Olson database timezone definitions and thus that any recurring events would end up with the same day & time. However I supposed there is no guarantee of that, so the VTIMEZONE allows one to define the daylight saving changes etc that one's system is using.
Many systems may accept ics files without VTIMEZONES BUT they are supposed to be there and correctly defined.

New events directly created on iCloud.com are not getting parsed by ical.net

BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Asia/Calcutta
X-LIC-LOCATION:Asia/Calcutta
BEGIN:STANDARD
DTSTART:18800101T000000
RDATE;VALUE=DATE-TIME:18800101T000000
TZNAME:HMT
TZOFFSETFROM:+055328
TZOFFSETTO:+055320
END:STANDARD
BEGIN:STANDARD
DTSTART:19411001T000000
RDATE;VALUE=DATE-TIME:19411001T000000
TZNAME:BURT
TZOFFSETFROM:+055320
TZOFFSETTO:+0630
END:STANDARD
BEGIN:STANDARD
DTSTART:19420515T000000
RDATE;VALUE=DATE-TIME:19420515T000000
RDATE;VALUE=DATE-TIME:19451015T000000
TZNAME:IST
TZOFFSETFROM:+0630
TZOFFSETTO:+0530
END:STANDARD
BEGIN:STANDARD
DTSTART:19420901T000000
RDATE;VALUE=DATE-TIME:19420901T000000
TZNAME:IST
TZOFFSETFROM:+0530
TZOFFSETTO:+0630
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
SUMMARY:New Event
UID:D1A9EEAF-AAE9-44B1-92B9-33A620779FA6
DTSTART;X-VOBJ-ORIGINAL-TZID=Asia/Calcutta:20170118T120000Z
DTEND;X-VOBJ-ORIGINAL-TZID=Asia/Calcutta:20170118T130000Z
END:VEVENT
END:VCALENDAR
Above is the ics for new event created on iCloud.
I came across with a problem while fetching events from iCloud. Problem is that the event that are directly created on iCloud are not getting parsed using ical.net. While that are being parsed by dday.ical. Event created using ical.net are parsed correctly. Above ics is parsed correctly by DDay.iCal.
Using ical.net
MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(ics))
IICalendarCollection calendars = Calendar.LoadFromStream(stream, Encoding.UTF8);
Error comes at Calendar.LoadFromStream and error is String was not recognized as a valid DateTime.
Using Dday.iCal
MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(ics))
IICalendarCollection calendars = iCalendar.LoadFromStream(stream, Encoding.UTF8);
Above code of Dday works fine for same ics.
Problem this with VTIMEZONE component which is not getting parsed by ical.net. When we create request for get all meetings we ask for properties of event we want in response. If not needed then remove timezone component from request i.e don't ask for timezone component. Remove from your request.
Thanks
When I saw this I was using version 2.2.30 which was latest at that time. This problem is solved in version 2.2.31 and fix will be available for higher version as well.
See release note for version 2.2.31 : https://github.com/rianjs/ical.net/blob/master/release-notes.md
I have checked this on latest for now i.e 2.2.33 and it is working fine now.

Cancel 1 instance of a repeating date in iCalendar

I have repeating event in October 2013.
I need to cancel 1 instance in October 15.
How it can be done? Special tags? Calendar is listed below:
BEGIN:VCALENDAR
PRODID:-//atomos.pro//test//ru
VERSION:2.0
BEGIN:VEVENT
DTSTART;TZID=Europe/Moscow:20131001T100000Z
DTEND;TZID=Europe/Moscow:20131001T110000Z
RRULE:FREQ=DAILY;UNTIL=20131031T120000Z
SUMMARY:NEED
LOCATION:TEST
END:VEVENT
END:VCALENDAR
Are you talking about sending a CANCEL to the attendee of the meeting or about just excluding the 15th of October date ? Don't see any attendee in there but I imagine that you did not include all properties in your sample (UID is missing as well)
For the former you would send an iTIP CANCEL to all the attendees with a RECURRENCE-ID matching the DTSTART of the instance for the 15th of October (see https://www.rfc-editor.org/rfc/rfc5546#section-3.2.5).
So something like:
BEGIN:VCALENDAR
PRODID:-//atomos.pro//test//ru
VERSION:2.0
METHOD:CANCEL
BEGIN:VEVENT
UID:(same UID as the original VEVENT)
RECURRENCE-ID;TZID=Europe/Moscow:20131015T100000Z
DTSTART;TZID=Europe/Moscow:20131001T100000Z
DTEND;TZID=Europe/Moscow:20131001T110000Z
STATUS:CANCELLED
SUMMARY:NEED
LOCATION:TEST
END:VEVENT
END:VCALENDAR
If it is the later, you can simply add an EXDATE for the 15th of October to your event, i.e.:
BEGIN:VEVENT
DTSTART;TZID=Europe/Moscow:20131001T100000Z
DTEND;TZID=Europe/Moscow:20131001T110000Z
RRULE:FREQ=DAILY;UNTIL=20131031T120000Z
EXDATE;TZID=Europe/Moscow:20131015T100000Z
SUMMARY:NEED
LOCATION:TEST
END:VEVENT
arnaudq, thank you. this example hides events for 15 and 20 october.
BEGIN:VCALENDAR
PRODID:-//atomos.pro//test//ru
VERSION:2.0
BEGIN:VEVENT
DTSTART;TZID=Europe/Moscow:20131001T100000Z
DTEND;TZID=Europe/Moscow:20131001T110000Z
RRULE:FREQ=DAILY;UNTIL=20131031T120000Z
EXDATE;TZID=Europe/Moscow:20131015T100000Z,20131020T100000Z
SUMMARY:WORKING
LOCATION:NOW
END:VEVENT
END:VCALENDAR

Outlook ICS iCal BYDAY attribute giving "not a valid internet calendar file"

I have an ICS file like so:
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
PRODID:Absorb LMS
BEGIN:VEVENT
CREATED;TZID=Mountain Standard Time:20110713T142655
DESCRIPTION:\n
DTEND;TZID=Mountain Standard Time:20110728T130000
DTSTAMP;TZID=Mountain Standard Time:20110727T154733
DTSTART;TZID=Mountain Standard Time:20110728T120000
ORGANIZER;CN=ABSORB:MAILTO:info#absorbtraining.com
RRULE:FREQ=DAILY;UNTIL=20111223T000000;BYDAY=MO,TH
SEQUENCE:20241
SUMMARY:_blah's Test
UID:63118
BEGIN:VALARM
ACTION:Display
DESCRIPTION:Absorb Reminder
TRIGGER:-PT1H
END:VALARM
END:VEVENT
BEGIN:VTIMEZONE
TZID:Mountain Standard Time
BEGIN:STANDARD
DTSTART;TZID=;VALUE=DATE:20100101
RRULE:FREQ=YEARLY;BYDAY=1SU;BYHOUR=2;BYMINUTE=0;BYMONTH=11
TZNAME:Mountain Standard Time
TZOFFSETFROM:-0600
TZOFFSETTO:-0700
END:STANDARD
BEGIN:DAYLIGHT
DTSTART;TZID=;VALUE=DATE:20100101
RRULE:FREQ=YEARLY;BYDAY=2SU;BYHOUR=2;BYMINUTE=0;BYMONTH=3
TZNAME:Mountain Daylight Time
TZOFFSETFROM:-0700
TZOFFSETTO:-0600
END:DAYLIGHT
END:VTIMEZONE
END:VCALENDAR
This doesn't work when you open it in Outlook 2010 (you get not valid internet calendar file message and it is NOT helpful).
However, if you change the line 13 to:
RRULE:FREQ=DAILY;UNTIL=20111223T000000;BYDAY=MO,TH
or
RRULE:FREQ=DAILY;UNTIL=20111223T000000;BYDAY=MO,TH,FR
It works.
All of these variations pass the iCal verification tests, it's just a stupid issue with outlook.
Does anyone know any work-arounds or something else I can do?
Cheers,
Rich
Change the method to publish and try... I guess it'll work
METHOD:PUBLISH

VCALENDAR Timezone and DST in Outlook 2007

I have a problem with ical while opening in outlook 2007, it shows 1 hour ahead in australian time zone and one hour behind in other locations.
It wil be a great help, if some body could figure it out,
Following is the .ico file content.
BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Canberra, Melbourne, Sydney
BEGIN:STANDARD
DTSTART:16010101T000000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
TZOFFSETFROM:+1100
TZOFFSETTO:+1000
TZNAME:Standard Time
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T000000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=10
TZOFFSETFROM:+1000
TZOFFSETTO:+1100
TZNAME:Daylight Saving Time
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ATTENDEE;CN="ullas ";ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:ullasjn#gmail.com
ORGANIZER:MAILTO:ullasjn#gmail.com
DTSTART;TZID="Canberra, Melbourne, Sydney":20091019T180000
DTEND;TZID="Canberra, Melbourne, Sydney":20091019T183000
LOCATION:Melb-L19 Room 8
TRANSP:OPAQUE
SEQUENCE:1
UID:rtwj2xbjvihflu5540kyy055_3379_633915722919214986
DTSTAMP:20091019T184901Z
SUMMARY:CMS[Ref#:10300][UPDATED: Meeting reservation]
DESCRIPTION: Melb-L19 Room 8\n\nMeeting Starting Time: 2009/10/19 18:00\nMeeting Ending Time: 2009/10/19 18:30\n\n AUST TIME : 18-18.30\n\n\n
PRIORITY:5
X-MICROSOFT-CDO-IMPORTANCE:1
CLASS:PUBLIC
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR
Not sure what you can control, or where the ical data is coming from, but what if you change the TZID to 'Australia/Melbourne' or 'Australia/Sydney'?
DTSTART;TZID="Australia/Sydney":20091019T180000
DTEND;TZID="Australia/Sydney":20091019T183000
This may not be the latest, but this is the VTIMEZONE record I have.
BEGIN:VTIMEZONE
TZID:Australia/Sydney
X-LIC-LOCATION:Australia/Sydney
BEGIN:DAYLIGHT
TZOFFSETFROM:+1000
TZOFFSETTO:+1100
TZNAME:EST
DTSTART:19701025T020000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+1000
TZOFFSETTO:+1000
TZNAME:EST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
I think that this type of problem when you see one or two hours more or less from what you expect is related with daylight saving times.
I recommend you to check which is the correct current time here:
http://www.timeanddate.com/worldclock/city.html?n=152
(note that right now you have Daylight saving time: +1 hour)
And then check if the configuration of the computer that generated the calendar is correct, this means if is taking in account the Daylight saving time.