From 1b06a7e1c3953ced42bd3c783372f1dfd765489f Mon Sep 17 00:00:00 2001 From: John Crisp Date: Fri, 21 Feb 2020 12:19:20 +0100 Subject: [PATCH] Fix the End time and expiry calculation --- include/openssl_functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/openssl_functions.php b/include/openssl_functions.php index bb9fdd4..0bd8368 100644 --- a/include/openssl_functions.php +++ b/include/openssl_functions.php @@ -353,12 +353,12 @@ function CAdb_explode_entry($dbentry) { } sscanf(CA_cert_startdate($a[3]),"%s %s %s %s", $mm,$dd,$tt,$yy); - $db['issued'] = strftime("%y-%b-%d", strtotime("$dd $mm $yy")); + $db['issued'] = strftime("%Y-%b-%d", strtotime("$yy-$mm-$dd")); - sscanf($a[1], "%2s%2s%2s",$yy,$mm,$dd); - $db['expires'] = strftime("%y-%b-%d", strtotime("$mm/$dd/$yy")); + sscanf(CA_cert_enddate($a[3]), "%s %s %s %s",$mm,$dd,$tt,$yy); + $db['expires'] = strftime("%Y-%b-%d", strtotime("$yy-$mm-$dd")); - if (time() > strtotime("$mm/$dd/$yy")) + if (time() > strtotime("$mm-$dd-$yy")) $db['status'] = "Expired"; $db['serial'] = $a[3];