Page 1 of 1

[SOLVED] tis-audit-admin-cert-expiration

Published: November 12, 2025 - 11:05 PM
by b.ald
Good morning,

I encountered a small error with this package.
Error: can't subtract offset-naive and offset-aware datetimes
After checking Stack Overflow, it turned out that the following modifications were needed in the session-setup and package auditing:

Code: Select all

date_diff = SSLCertificate(cert).not_after - datetime.utcnow()
by :

Code: Select all

date_diff = SSLCertificate(cert).not_after - datetime.now(timezone.utc)
(A story about how, although both dates are in UTC, Python couldn't determine if they were actually in the same time zone... if I understood correctly...)

Commander.

Re: tis-audit-admin-cert-expiration

Published: Dec 9, 2025 - 11:56 AM
by blemoigne
Hello,
Thank you for the correction, I'm updating the package on the store.
Best regards,
Bertrand