From c96d01d376d5bc579930481e072b66e2d1e61419 Mon Sep 17 00:00:00 2001 From: Dirk Date: Mon, 9 Apr 2018 09:07:51 +0200 Subject: [PATCH] Fix regression in #198 For enddate conversion there's no need to tell ``date`` to convert the time including the TZ. MacOS X' date hiccups when this will be done (strangely, FreeBSDs are fine). --- testssl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index 4d09f89..564cc2a 100755 --- a/testssl.sh +++ b/testssl.sh @@ -6232,7 +6232,7 @@ certificate_info() { # best we are able to do under OpenBSD days2expire="" else - days2expire=$(( $(parse_date "$enddate" "+%s" "%F %H:%M %z") - $(LC_ALL=C date "+%s") )) # in seconds + days2expire=$(( $(parse_date "$enddate" "+%s" "%F %H:%M") - $(LC_ALL=C date "+%s") )) # in seconds days2expire=$((days2expire / 3600 / 24 )) if grep -q "^Let's Encrypt Authority" <<< "$issuer_CN"; then # we take the half of the thresholds for LE certificates