From 0238608f85236f0b886f0b53c904d56e08d27d05 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sun, 16 Mar 2025 00:57:28 +0200 Subject: Directly call the script to avoid populating the logs with too much info --- lib/_ak_utils | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/_ak_utils') diff --git a/lib/_ak_utils b/lib/_ak_utils index d1ca496..d437cb9 100755 --- a/lib/_ak_utils +++ b/lib/_ak_utils @@ -20,3 +20,10 @@ function _ak_datetime_unix(){ date -u +%s | tr -d '\n' } + +function _ak_datetime_unix_to_human(){ + if [ ! -z $1 ] && [ -n "$1" ] && [ "$(echo $1 | sed -e 's/[0-9]\{10\}//g')" == "" ] + then + date --date=@$1 +%Y%m%d_%H%M%S 2>/dev/null || date -r $1 +%Y%m%d_%H%M%S 2>/dev/null + fi +} -- cgit v1.2.3