diff --git a/caldav/objects.py b/caldav/objects.py index 5cf7314..0e78b0b 100644 --- a/caldav/objects.py +++ b/caldav/objects.py @@ -2999,7 +2999,7 @@ def complete( * safe - see doc for _complete_recurring_safe for details """ if not completion_timestamp: - completion_timestamp = datetime.utcnow().astimezone(timezone.utc) + completion_timestamp = datetime.now(timezone.utc) if "RRULE" in self.icalendar_component and handle_rrule: return getattr(self, "_complete_recurring_%s" % rrule_mode)( diff --git a/tests/test_caldav.py b/tests/test_caldav.py index d7e5e0e..1fd855d 100644 --- a/tests/test_caldav.py +++ b/tests/test_caldav.py @@ -2288,7 +2288,7 @@ def testCreateOverwriteDeleteEvent(self): if not self.check_compatibility_flag( "no_todo" ) and not self.check_compatibility_flag("no_todo_on_standard_calendar"): - t1.delete + t1.delete() if self.check_compatibility_flag("non_existing_raises_other"): expected_error = error.DAVError