Search code examples
icalendar

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:[email protected]
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

Solution

  • 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.