From 778b32f78c7ba01eaabbe896159c405355083437 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Sat, 1 Feb 2025 18:31:07 +1100 Subject: [PATCH] fix: Use new not after utc for cert date --- troubleshooting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/troubleshooting.py b/troubleshooting.py index a5325e8..4959c35 100644 --- a/troubleshooting.py +++ b/troubleshooting.py @@ -190,9 +190,9 @@ def https_check(params, authentication): break - expiry_date = cert_obj.not_valid_after + expiry_date = cert_obj.not_valid_after_utc # Check if expiry date is past - if expiry_date < datetime.datetime.now(): + if expiry_date < datetime.datetime.now(datetime.timezone.utc): return {"result": "Certificate is expired"} else: return {"result": "No certificate found"}