This commit is contained in:
doms9 2025-09-04 10:10:28 -04:00
parent 00000d940e
commit 00000d9b81

View file

@ -52,7 +52,7 @@ async def refresh_cert_cache(client: httpx.AsyncClient) -> ssl.SSLContext:
async def get_cert(client: httpx.AsyncClient) -> ssl.SSLContext: async def get_cert(client: httpx.AsyncClient) -> ssl.SSLContext:
if CERT_FILE.is_file(): if CERT_FILE.is_file():
mtime = datetime.fromtimestamp(CERT_FILE.stat().st_mtime) mtime = datetime.fromtimestamp(CERT_FILE.stat().st_mtime, TZ)
if now - mtime < timedelta(days=30): if now - mtime < timedelta(days=30):
return ssl.create_default_context(cafile=CERT_FILE) return ssl.create_default_context(cafile=CERT_FILE)