From 15caf7ce4f53a431de5c955cf7a3daeacdd94fc2 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Tue, 25 Feb 2025 11:53:37 +1100 Subject: [PATCH] fix: Update to use old timezone format --- requirements.txt | 3 ++- tools.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4e35fb3..b19f980 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,5 @@ gunicorn requests python-dotenv dnspython -cryptography \ No newline at end of file +cryptography +datetime \ No newline at end of file diff --git a/tools.py b/tools.py index 5d04b58..3e9457a 100644 --- a/tools.py +++ b/tools.py @@ -101,7 +101,7 @@ def check_ssl(domain: str): expiry_date = cert_obj.not_valid_after_utc # Check if expiry date is past - if expiry_date < datetime.datetime.now(tz=datetime.UTC): + if expiry_date < datetime.datetime.now(datetime.timezone.utc): returns["cert"]["expired"] = True returns["cert"]["valid"] = False