Skip to content

Commit ae061e8

Browse files
authored
fix deprecation warning in auth.py
1 parent a2a8181 commit ae061e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ydb/iam/auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
def get_jwt(account_id, access_key_id, private_key, jwt_expiration_timeout, algorithm, token_service_url, subject=None):
4444
assert jwt is not None, "Install pyjwt library to use jwt tokens"
4545
now = time.time()
46-
now_utc = datetime.utcfromtimestamp(now)
47-
exp_utc = datetime.utcfromtimestamp(now + jwt_expiration_timeout)
46+
now_utc = datetime.fromtimestamp(now, datetime.UTC)
47+
exp_utc = datetime.fromtimestamp(now + jwt_expiration_timeout, datetime.UTC)
4848
payload = {
4949
"iss": account_id,
5050
"aud": token_service_url,

0 commit comments

Comments
 (0)