Correction again :)
This commit is contained in:
parent
02269b38f1
commit
433dc3883c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user