summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <erich.eckner.ext@bestsecret.com>2023-07-07 09:28:07 +0200
committerErich Eckner <erich.eckner.ext@bestsecret.com>2023-07-07 09:28:07 +0200
commitf95df17a90a191c33bfb726e8be36289acd79395 (patch)
tree95ed1c50598707694a280fd4a855e6b336ece7c5
parent047117b7f6cf4227b14c394d9de9c398cb424392 (diff)
downloadcrypt-expiry-check-f95df17a90a191c33bfb726e8be36289acd79395.tar.xz
format time
-rwxr-xr-xcrypt-expiry-check.in6
1 files changed, 5 insertions, 1 deletions
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}