diff --git a/CHANGES.rst b/CHANGES.rst index 816231e..ad7cf34 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,9 @@ Changelog 3.4dev (unreleased) ------------------- +- Allow seconds in vUTCOffset properties. Fixes #55. + [thet] + - Let ``Component.decode`` correctly decode vRecur properties. Fixes #70. [thet] diff --git a/src/icalendar/prop.py b/src/icalendar/prop.py index 73ae615..6a10826 100644 --- a/src/icalendar/prop.py +++ b/src/icalendar/prop.py @@ -790,20 +790,24 @@ class vUTCOffset(object): self.params = Parameters() def to_ical(self): - td = self.td - day_in_minutes = (td.days * 24 * 60) - seconds_in_minutes = td.seconds // 60 - total_minutes = day_in_minutes + seconds_in_minutes - if total_minutes == 0: + + if self.td