Skip to content

Commit

Permalink
#451 ical: Using DTEND to discard finished recordings
Browse files Browse the repository at this point in the history
This will allow get_events_from_string_ical() to return an 'ongoing' event
  • Loading branch information
Alfro committed Apr 17, 2017
1 parent 0bc1f41 commit c91b617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion galicaster/utils/ical.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_events_from_string_ical(ical_data, limit=0):
if limit > 0:
events = cal.walk('vevent')[count:limit+count]
for event in events:
if event['DTSTART'].dt.replace(tzinfo=None) < datetime.utcnow():
if event['DTEND'].dt.replace(tzinfo=None) < datetime.utcnow():
count += 1
if count > 0:
events = cal.walk('vevent')[count:limit+count]
Expand Down

0 comments on commit c91b617

Please sign in to comment.