diff options
author | Jelmer Vernooij <jelmer@debian.org> | 2016-09-04 16:47:19 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@debian.org> | 2016-09-04 16:47:19 +0000 |
commit | 08ddb368797bc5b4a213e8ee75bcc135e6e7e83d (patch) | |
tree | 6e781cfab9e5b0cc9546ab6a2c4b389533f2702b | |
parent | edcf3d94d96d9d8355b00449fe4c35d855d1c15c (diff) |
Refresh patch.
-rw-r--r-- | debian/patches/0003-Treat-untils-as-floating.patch | 4 | ||||
-rw-r--r-- | vobject/icalendar.py | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/debian/patches/0003-Treat-untils-as-floating.patch b/debian/patches/0003-Treat-untils-as-floating.patch index 623ec8c..e788401 100644 --- a/debian/patches/0003-Treat-untils-as-floating.patch +++ b/debian/patches/0003-Treat-untils-as-floating.patch @@ -7,10 +7,10 @@ Subject: Treat untils as floating 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/vobject/icalendar.py b/vobject/icalendar.py -index c49dbbb..120b252 100644 +index bfb00df..add91f7 100644 --- a/vobject/icalendar.py +++ b/vobject/icalendar.py -@@ -451,6 +451,18 @@ class RecurringComponent(Component): +@@ -478,6 +478,18 @@ class RecurringComponent(Component): if dtstart.tzinfo is None: until = until.replace(tzinfo=None) diff --git a/vobject/icalendar.py b/vobject/icalendar.py index bfb00df..add91f7 100644 --- a/vobject/icalendar.py +++ b/vobject/icalendar.py @@ -478,6 +478,18 @@ class RecurringComponent(Component): if dtstart.tzinfo is None: until = until.replace(tzinfo=None) + # RFC2445 actually states that UNTIL must be a UTC value. Whilst the + # changes above work OK, one problem case is if DTSTART is floating but + # UNTIL is properly specified as UTC (or with a TZID). In that case dateutil + # will fail datetime comparisons. There is no easy solution to this as + # there is no obvious timezone (at this point) to do proper floating time + # offset compisons. The best we can do is treat the UNTIL value as floating. + # This could mean incorrect determination of the last instance. The better + # solution here is to encourage clients to use COUNT rather than UNTIL + # when DTSTART is floating. + if dtstart.tzinfo is None: + until = until.replace(tzinfo=None) + rule._until = until # add the rrule or exrule to the rruleset |