diff --git a/CHANGES.rst b/CHANGES.rst index db4f3f1..e0fa29e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,7 +14,8 @@ New features: Bug fixes: -- *add item here* +- added an assertion that VTIMEZONE sub-components' DTSTART must be of type + DATETIME [geier] 3.11.4 (2017-05-10) diff --git a/src/icalendar/cal.py b/src/icalendar/cal.py index 5b8b915..a5a08f5 100644 --- a/src/icalendar/cal.py +++ b/src/icalendar/cal.py @@ -575,6 +575,9 @@ class Timezone(Component): for component in self.walk(): if type(component) == Timezone: continue + assert isinstance(component['DTSTART'].dt, datetime), ( + "VTIMEZONEs sub-components' DTSTART must be of type datetime, not date" + ) try: tzname = str(component['TZNAME']) except KeyError: