Skip to content

Commit 125a019

Browse files
authored
Merge pull request #1081 from rughh/fix/mark_ics_start_and_end_time_as_non_floating
fix: mark ics start and end time as non floating
2 parents 0410882 + b87ada4 commit 125a019

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/helpers/ical_helper.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ def icalendar(*events)
77
cal.event do |item|
88
item.summary = event.name
99
item.description = "#{event.description} #{event_url(event)}"
10-
item.dtstart = event.date.utc
11-
item.dtend = event.end_date.utc
10+
item.dtstart = Icalendar::Values::DateTime.new event.date.utc, tzid: 'UTC'
11+
item.dtend = Icalendar::Values::DateTime.new event.end_date.utc, tzid: 'UTC'
1212
item.url = event_url(event)
1313
item.location = event.location.name if event.location
1414
end

spec/helpers/ical_helper_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
helper.icalendar(event).to_s.tap do |it|
88
expect(it).to match('http://test.host/events/awesome-ottawa-123')
99
expect(it).to match('SUMMARY:awesome ottawa')
10-
expect(it).to match('DTSTART:20111111T170000')
10+
expect(it).to match('DTSTART:20111111T170000Z')
1111
end
1212
end
1313

0 commit comments

Comments
 (0)