iCal STANDARD or DAYLIGHT error when already defined - icalendar

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.

Related

I cannot figure out what date format this is

I've got these ical files I'm trying to process and they come with microsoft teams links. The invites have this very strange format for the date that I just can't figure out. I thought it was UTC but I still can't seem to figure it out. Any calendaring program opens it just fine, showing me the correct date. But I want to process the text.
Here is an example:
BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Central Standard Time
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0600
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:-0600
TZOFFSETTO:-0500
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
This one in particular converts to October 27, 2021 at 3:00pm Central Daylight time. I could process things another way, but I have to satisfy my curiosity here. I tried to look at the RFC for ICS but I haven't seen what I'm looking for.
Those are daylight saving changes for the timezone component. https://datatracker.ietf.org/doc/html/rfc5545#section-3.6.5
"DTSTART" in this usage MUST be specified as a date with a local time value.
For local time value, see Form#1 for DATETIME https://datatracker.ietf.org/doc/html/rfc5545#page-33

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

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

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.

Timezones not working for calendar event

I am having difficulties with timezones in an event. This is the contents of the event, and it's specifying the event with a TZID. I am being told however that when people in Central timezone add it, it appears as 2PM rather then intended 1PM. I am in ET so not able to test this.
Do you know why it would be happening?
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//http://XXX//Event
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART;TZID="America/Chicago":20150811T130000
DTEND;TZID="America/Chicago":20150811T141500
SUMMARY:Test Event
DESCRIPTION:Test Event
LOCATION:Test Event Location
END:VEVENT
END:VCALENDAR
See RFC5545, Time Zone Component and Time Zone Identifier: you need to add a VTIMEZONE component to your calendar file where you definea TZID so that you can refer to it in your VEVENT.
Parameter Name: TZID
This parameter MUST be specified on the "DTSTART",
"DTEND", "DUE", "EXDATE", and "RDATE" properties when either a
DATE-TIME or TIME value type is specified and when the value is
neither a UTC or a "floating" time. Failure to include and follow VTIMEZONE definitions in iCalendar objects may lead to inconsistent understanding of the local time
at any given location.
It should be noted that while Outlook/Exchange have repeatedly been reported to not require the VTIMEZONE, failure to include a VTIMEZONE leads to unpredictable behaviour from other calendars.