diff options
author | Erich Eckner <erich.eckner.ext@bestsecret.com> | 2023-07-07 09:28:07 +0200 |
---|---|---|
committer | Erich Eckner <erich.eckner.ext@bestsecret.com> | 2023-07-07 09:28:07 +0200 |
commit | f95df17a90a191c33bfb726e8be36289acd79395 (patch) | |
tree | 95ed1c50598707694a280fd4a855e6b336ece7c5 /crypt-expiry-check.in | |
parent | 047117b7f6cf4227b14c394d9de9c398cb424392 (diff) | |
download | crypt-expiry-check-f95df17a90a191c33bfb726e8be36289acd79395.tar.xz |
format time
Diffstat (limited to 'crypt-expiry-check.in')
-rwxr-xr-x | crypt-expiry-check.in | 6 |
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} |