Fix for timezone-awareness adder out-of-range exception
This commit is contained in:
parent
f0d8507818
commit
367218ed67
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ class CalendarInterface (DataSourceInterface):
|
|||
until_index = rrule.index("UNTIL")
|
||||
|
||||
tz_index = until_index + len(until_example)
|
||||
if rrule[tz_index] is "T":
|
||||
if tz_index >= 0 and tz_index < len(rrule) and rrule[tz_index] is "T":
|
||||
return rrule
|
||||
|
||||
return rrule[:tz_index] + timezone_str + rrule[tz_index:]
|
Loading…
Reference in a new issue