diff --git a/app/views/events/index.ics.haml b/app/views/events/index.ics.haml index f39491c6..9fd89dcb 100644 --- a/app/views/events/index.ics.haml +++ b/app/views/events/index.ics.haml @@ -5,9 +5,13 @@ cal = Icalendar::Calendar.new @events.each do |event| tzid = event.region.tzid - tz = TZInfo::Timezone.get tzid - timezone = tz.ical_timezone event.start_time - cal.add_timezone timezone + begin + tz = TZInfo::Timezone.get tzid + timezone = tz.ical_timezone event.start_time + cal.add_timezone timezone + rescue TZInfo::InvalidTimezoneIdentifier + # No need to add this tz + end cal.event do |e| e.dtstamp = Icalendar::Values::DateTime.new event.decision_time, tzid: tzid