Skip to content

Commit 602ff41

Browse files
authored
Merge pull request #101 from IdentityPython/utc_time
Was mixing UTC time zone and local time zone.
2 parents 2fcf15d + edd56e2 commit 602ff41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cryptojwt/jwt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def utc_time_sans_frac():
2727
2828
:return: A number of seconds
2929
"""
30-
return int((datetime.utcnow() - datetime(1970, 1, 1)).total_seconds())
30+
return int(datetime.utcnow().timestamp())
3131

3232

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

0 commit comments

Comments
 (0)