Correction again :)
This commit is contained in:
parent
02269b38f1
commit
433dc3883c
@ -1,13 +1,13 @@
|
|||||||
:ruby
|
:ruby
|
||||||
# Create a calendar with an event (standard method)
|
# Create a calendar with an event (standard method)
|
||||||
cal = Icalendar::Calendar.new
|
cal = Icalendar::Calendar.new
|
||||||
tzid = event.region.tzid
|
tzid = @event.region.tzid
|
||||||
use_timezone = true
|
use_timezone = true
|
||||||
if cal.timezones.none? { |t| tzid == t.tzid }
|
if cal.timezones.none? { |t| tzid == t.tzid }
|
||||||
# Only add this zone once
|
# Only add this zone once
|
||||||
begin
|
begin
|
||||||
tz = TZInfo::Timezone.get tzid
|
tz = TZInfo::Timezone.get tzid
|
||||||
timezone = tz.ical_timezone event.start_time
|
timezone = tz.ical_timezone @event.start_time
|
||||||
cal.add_timezone timezone
|
cal.add_timezone timezone
|
||||||
rescue TZInfo::InvalidTimezoneIdentifier
|
rescue TZInfo::InvalidTimezoneIdentifier
|
||||||
# No need to add this tz
|
# No need to add this tz
|
||||||
|
Loading…
Reference in New Issue
Block a user