Skip to content

Commit

Permalink
Use timezone.utc for compatibility with Py<3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
smurfix committed Oct 11, 2024
1 parent 442bce3 commit 0604bb9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions caldav/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)(
Expand Down

0 comments on commit 0604bb9

Please sign in to comment.