Skip to content

Commit 9d6d9a9

Browse files
committed
fix
1 parent dce017f commit 9d6d9a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ydb/iam/auth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import grpc
44
import time
55
import abc
6-
from datetime import datetime, UTC
6+
import datetime
77
import json
88
import os
99

@@ -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.fromtimestamp(now, UTC)
47-
exp_utc = datetime.fromtimestamp(now + jwt_expiration_timeout, UTC)
46+
now_utc = datetime.datetime.fromtimestamp(now, datetime.UTC)
47+
exp_utc = datetime.datetime.fromtimestamp(now + jwt_expiration_timeout, datetime.UTC)
4848
payload = {
4949
"iss": account_id,
5050
"aud": token_service_url,

0 commit comments

Comments
 (0)