Possible refix

This commit is contained in:
Maximilian Giller 2019-04-09 10:08:15 +02:00
parent a6aebf1c37
commit fdc0197da1

View file

@ -127,7 +127,10 @@ class CalendarInterface (DataSourceInterface):
until_index = rrule.index("UNTIL")
tz_index = until_index + len(until_example)
if tz_index >= 0 and tz_index < len(rrule) and rrule[tz_index] is "T":
if tz_index < 0 or tz_index >= len(rrule):
return rrule
if rrule[tz_index] is "T":
return rrule
return rrule[:tz_index] + timezone_str + rrule[tz_index:]