Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidz00 committed Jun 6, 2024
2 parents 4a946b3 + 2ce61e7 commit a384345
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def update_env(token: AnyStr, expires_in: int) -> None:
:type expires_in: int
"""
try:
expiration_time = datetime.utcnow() + timedelta(seconds=expires_in)
expiration_time = datetime.now(timezone.utc) + timedelta(seconds=expires_in)

# Small buffer to account for time sync issues
buffer = 5 * 60
Expand Down Expand Up @@ -139,7 +139,7 @@ def token_valid() -> bool:
expiration_time = datetime.fromtimestamp(
float(token_expiration), tz=timezone.utc
)
current_time = datetime.utcnow().replace(tzinfo=timezone.utc)
current_time = datetime.now(timezone.utc).replace(tzinfo=timezone.utc)
return current_time < expiration_time
return False

Expand Down

0 comments on commit a384345

Please sign in to comment.