diff --git a/operator/gefyra/bridgestate.py b/operator/gefyra/bridgestate.py index c0de44b6..7f9f53b1 100644 --- a/operator/gefyra/bridgestate.py +++ b/operator/gefyra/bridgestate.py @@ -1,4 +1,4 @@ -from datetime import datetime, UTC +from datetime import datetime from typing import Any, Optional from gefyra.bridge.abstract import AbstractGefyraBridgeProvider from gefyra.bridge.factory import BridgeProviderType, bridge_provider_factory @@ -107,7 +107,7 @@ def sunset(self) -> Optional[datetime]: @property def should_terminate(self) -> bool: - if self.sunset and self.sunset <= datetime.now(UTC): + if self.sunset and self.sunset <= datetime.utcnow(): # remove this bridge because the sunset time is in the past self.logger.warning( f"Bridge '{self.object_name}' should be terminated "