Possible bugfix for 'begin must be before end'

This commit is contained in:
Ace 2020-01-18 16:09:26 +01:00 committed by GitHub
parent 4967a86063
commit 3ca9a85bf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,8 +44,8 @@ def fetch_events():
if events.all_day and events.duration.days > 1:
events.end = events.end.replace(days=-2)
else:
events.begin = events.begin.to(timezone)
events.end = events.end.to(timezone)
events.begin = events.begin.to(timezone)
try:
rule = re.search('RRULE:(.+?)\n', event_str).group(0)[:-2]
if re.search('UNTIL=(.+?);', rule) and not re.search('UNTIL=(.+?)Z;', rule):
@ -76,8 +76,8 @@ def fetch_events():
events.end = events.end.replace(days=-2)
if not events.all_day:
events.begin = events.begin.to(timezone)
events.end = events.end.to(timezone)
events.begin = events.begin.to(timezone)
""" The list upcoming_events should not be modified. If you need the data from
this one, copy the list or the contents to another one."""