diff --git a/check_pve.py b/check_pve.py index c9ed1a4..321b2e7 100755 --- a/check_pve.py +++ b/check_pve.py @@ -31,7 +31,7 @@ try: import argparse - from datetime import datetime + from datetime import datetime, timezone from enum import Enum import requests @@ -677,7 +677,7 @@ def check_vzdump_backup(self, name: Optional[str] = None) -> None: # Filter by timestamp, if provided delta = self.threshold_critical("delta") if delta is not None: - now = datetime.now(datetime.UTC).timestamp() + now = datetime.now(timezone.utc).timestamp() tasks = [t for t in tasks if not delta.check(now - t["starttime"])]