This commit is contained in:
Lorin Werthen 2017-02-08 17:44:20 +01:00
parent dbc8094d60
commit ea9ba4f559
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0

View file

@ -10,9 +10,11 @@ module IcalHelper
end end
def event_for(item) def event_for(item)
tzid = 'Europe/Brussels'
e = Icalendar::Event.new e = Icalendar::Event.new
e.dtstart = item[:time] e.dtstart = Icalendar::Values::DateTime.new item[:time], 'tzid' => tzid
e.dtend = item[:end] if item[:end] e.dtend = Icalendar::Values::DateTime.new item[:end], 'tzid' => tzid if item[:end]
e.summary = item[:title] e.summary = item[:title]
e.description = item[:description] + "\n\n" + item.reps[:text].compiled_content e.description = item[:description] + "\n\n" + item.reps[:text].compiled_content
e.location = item[:location] e.location = item[:location]