Skip to content

Commit a7dd24f

Browse files
authored
Merge pull request #104 from IdentityPython/timezone_utc
Timezone utc
2 parents 602ff41 + ca721a3 commit a7dd24f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ exclude_lines = [
2222

2323
[tool.poetry]
2424
name = "cryptojwt"
25-
version = "1.6.0"
25+
version = "1.6.1"
2626
description = "Python implementation of JWT, JWE, JWS and JWK"
2727
authors = ["Roland Hedberg <[email protected]>"]
2828
license = "Apache-2.0"

src/cryptojwt/jwt.py

+4-1
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)