work around a bug in dateutil that incorrectly parses Z dates

related: https://github.com/dateutil/dateutil/issues/349
This commit is contained in:
Ryan Petrello
2018-02-01 15:37:38 -05:00
parent b39269c4c2
commit 0a8df7fde2
2 changed files with 5 additions and 4 deletions

View File

@@ -127,7 +127,7 @@ class Schedule(CommonModel, LaunchTimeConfig):
https://github.com/dateutil/dateutil/pull/619
"""
kwargs['forceset'] = True
kwargs['tzinfos'] = {}
kwargs['tzinfos'] = {x: dateutil.tz.tzutc() for x in dateutil.parser.parserinfo().UTCZONE}
match = cls.TZID_REGEX.match(rrule)
if match is not None:
rrule = cls.TZID_REGEX.sub("DTSTART\g<stamp>TZI\g<rrule>", rrule)