From f95df17a90a191c33bfb726e8be36289acd79395 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 7 Jul 2023 09:28:07 +0200 Subject: format time --- crypt-expiry-check.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crypt-expiry-check.in b/crypt-expiry-check.in index 3c0a79b..c431099 100755 --- a/crypt-expiry-check.in +++ b/crypt-expiry-check.in @@ -125,7 +125,11 @@ set_retcode() ##################################################################### prints() { - MIN_DATE=$(echo $4 | ${AWK} '{ print $1, $2, $4 }') + if echo "$4" | ${GREP} -qx '[0-9]\+'; then + MIN_DATE=$(${DATE} '+%b %d %Y' -d@$4) + else + MIN_DATE=$(echo $4 | ${AWK} '{ print $1, $2, $4 }') + fi if ${ISSUER} && ! ${VALIDATION} then if ${NAGIOS} -- cgit v1.2.3-70-g09d2