From 0604bb964d7fa26449244faafd6ced8f009ffb0d Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Fri, 11 Oct 2024 15:38:37 +0200 Subject: [PATCH] Use timezone.utc for compatibility with Py<3.11 --- caldav/objects.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/caldav/objects.py b/caldav/objects.py index cd3f7dd..0e78b0b 100644 --- a/caldav/objects.py +++ b/caldav/objects.py @@ -15,7 +15,6 @@ class hierarchy into a separate file) from datetime import datetime from datetime import timedelta from datetime import timezone -from datetime import UTC from typing import Any from typing import List from typing import Optional @@ -3000,7 +2999,7 @@ def complete( * safe - see doc for _complete_recurring_safe for details """ if not completion_timestamp: - completion_timestamp = datetime.now(UTC) + completion_timestamp = datetime.now(timezone.utc) if "RRULE" in self.icalendar_component and handle_rrule: return getattr(self, "_complete_recurring_%s" % rrule_mode)(