tritech / node-icalendar

iCalendar parser and generator for Node.js
MIT License
233 stars 50 forks source link

Error parsing calendars with certain valid VTimezone data #10

Closed patrickmeiring closed 11 years ago

patrickmeiring commented 11 years ago

When a calendar has a VTIMEZONE block, with both standard and daylight components, but without a RRULE specified (appears to be optional as per RFC) an error is thrown.

"Cannot call method 'next' of null" @ var next_std = this.getRRule('STANDARD').next(dt); (line 62 of timezone.js)

BEGIN:VTIMEZONE TZID:E. Australia Standard Time BEGIN:STANDARD DTSTART:16010101T000000 TZOFFSETFROM:+1000 TZOFFSETTO:+1000 END:STANDARD BEGIN:DAYLIGHT DTSTART:16010101T000000 TZOFFSETFROM:+1000 TZOFFSETTO:+1000 END:DAYLIGHT END:VTIMEZONE

These kinds of VTIMEZONE blocks are being generated by Outlook for Mac.