Skip to content

Commit fe69c04

Browse files
committed
Same as oidcmsg. Should be kept in sync.
Needed in cryptojwt so eventually should be removed from oidcmsg.
1 parent 602ff41 commit fe69c04

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cryptojwt/jwt.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import logging
44
import uuid
55
from datetime import datetime
6+
from datetime import timezone
67
from json import JSONDecodeError
78

89
from .exception import HeaderError
@@ -27,7 +28,9 @@ def utc_time_sans_frac():
2728
2829
:return: A number of seconds
2930
"""
30-
return int(datetime.utcnow().timestamp())
31+
32+
now_timestampt = int(datetime.now(timezone.utc).timestamp())
33+
return now_timestampt
3134

3235

3336
def pick_key(keys, use, alg="", key_type="", kid=""):

0 commit comments

Comments
 (0)