Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit fba48dc

Browse files
committed
matched utc_time_sans_frac implementations.
1 parent 3d50d93 commit fba48dc

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def run_tests(self):
6767
"Programming Language :: Python :: 3.8",
6868
"Topic :: Software Development :: Libraries :: Python Modules"],
6969
install_requires=[
70-
"cryptojwt==1.6.0",
70+
"cryptojwt==1.6.1",
7171
"pyOpenSSL",
7272
"filelock>=3.0.12",
7373
'pyyaml>=5.1.2'

src/oidcmsg/time_util.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,17 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
"""
18-
Implements some usefull functions when dealing with validity of
18+
Implements some useful functions when dealing with validity of
1919
different types of information.
2020
"""
2121

2222
import calendar
23-
import logging
24-
import re
25-
import sys
26-
import time
2723
from datetime import datetime
2824
from datetime import timedelta
2925
from datetime import timezone
26+
import logging
27+
import re
28+
import time
3029

3130
TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
3231
TIME_FORMAT_WITH_FRAGMENT = re.compile("^(\d{4,4}-\d{2,2}-\d{2,2}T\d{2,2}:\d{2,2}:\d{2,2})\.\d*Z$")
@@ -353,7 +352,7 @@ def later_than(after, before):
353352
return after >= before
354353

355354

356-
def utc_time_sans_frac():
355+
def utc_time_sans_frac(): # MUST be the same as utc_time_sans_frac in cryptojwt
357356
now_timestampt = int(datetime.now(timezone.utc).timestamp())
358357
return now_timestampt
359358

tests/test_03_time_util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# !/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# pylint: disable=missing-docstring
44

0 commit comments

Comments
 (0)