Skip to content

Commit

Permalink
Merge pull request #104 from IdentityPython/timezone_utc
Browse files Browse the repository at this point in the history
Timezone utc
  • Loading branch information
rohe authored Dec 13, 2021
2 parents 602ff41 + ca721a3 commit a7dd24f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exclude_lines = [

[tool.poetry]
name = "cryptojwt"
version = "1.6.0"
version = "1.6.1"
description = "Python implementation of JWT, JWE, JWS and JWK"
authors = ["Roland Hedberg <[email protected]>"]
license = "Apache-2.0"
Expand Down
5 changes: 4 additions & 1 deletion src/cryptojwt/jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging
import uuid
from datetime import datetime
from datetime import timezone
from json import JSONDecodeError

from .exception import HeaderError
Expand All @@ -27,7 +28,9 @@ def utc_time_sans_frac():
:return: A number of seconds
"""
return int(datetime.utcnow().timestamp())

now_timestampt = int(datetime.now(timezone.utc).timestamp())
return now_timestampt


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

0 comments on commit a7dd24f

Please sign in to comment.