Skip to content

Commit

Permalink
Fix datetime utc compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
1maple1 committed Sep 17, 2024
1 parent eeadbf5 commit dc6ed7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions brewtils/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import appdirs
from box import Box
from datetime import datetime, UTC
from datetime import datetime, timezone
from packaging.version import Version
from requests import ConnectionError as RequestsConnectionError

Expand Down Expand Up @@ -388,7 +388,7 @@ def _hook(exc_type, exc_value, traceback):

@staticmethod
def get_timestamp(add_time: int = None):
current_timestamp = int(datetime.now(UTC).timestamp())
current_timestamp = int(datetime.now(timezone.utc).timestamp())
if add_time:
return current_timestamp + add_time
return current_timestamp
Expand Down

0 comments on commit dc6ed7a

Please sign in to comment.