adrianlee44 / ical2json

A simple node package to convert ical data to json
MIT License
66 stars 12 forks source link

Failing to parse extended TZID data #10

Open kokarn opened 7 years ago

kokarn commented 7 years ago

There is an TZID property in some calendars that makes the parser go haywire. https://tools.ietf.org/html/rfc5545

BEGIN:VEVENT
UID:qTJ-3n1sAUwFl
SUMMARY:Luleå Hockey - Örebro Hockey 4 - 3 SO
DESCRIPTION:
LOCATION:Coop Norrbotten Arena
DTSTART;TZID="+02:00":20170916T180000
DTEND;TZID=Europe/Stockholm:20170916T203000
URL:http://biljett.luleahockey.se/Home/tickets/273/False?style=shl
GEO:65.597807;22.148331
END:VEVENT
{
  UID: 'qTJ-3n1sAUwFl',
  SUMMARY: 'Luleå Hockey - Örebro Hockey 4 - 3 SO',
  DESCRIPTION: '',
  LOCATION: 'Coop Norrbotten Arena',
  'DTSTART;TZID="+02': '00":20170916T180000',
  'DTEND;TZID=Europe/Stockholm': '20170916T203000',
  URL: 'http://biljett.luleahockey.se/Home/tickets/273/False?style=shl',
  GEO: '65.597807;22.148331'
}
adrianlee44 commented 7 years ago

Thanks for reporting this. Similar to #9, ical2json missed part of the ical specs. I'm looking to update the package.

TimDaub commented 4 years ago

This is still a problem...

sd-softdev commented 1 year ago

I provide a soluion in pull request https://github.com/adrianlee44/ical2json/pull/53

@adrianlee44 can you review it and merge in main branch?