Correction again :)

This commit is contained in:
echarp 2019-04-30 15:40:52 +02:00
parent 02269b38f1
commit 433dc3883c

View File

@ -1,13 +1,13 @@
:ruby
# Create a calendar with an event (standard method)
cal = Icalendar::Calendar.new
tzid = event.region.tzid
tzid = @event.region.tzid
use_timezone = true
if cal.timezones.none? { |t| tzid == t.tzid }
# Only add this zone once
begin
tz = TZInfo::Timezone.get tzid
timezone = tz.ical_timezone event.start_time
timezone = tz.ical_timezone @event.start_time
cal.add_timezone timezone
rescue TZInfo::InvalidTimezoneIdentifier
# No need to add this tz