Manage offset without a specific name
This commit is contained in:
parent
6008770a9d
commit
e2f9e707c3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user