diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2025-03-16 00:57:28 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2025-03-16 00:57:28 +0200 |
commit | 0238608f85236f0b886f0b53c904d56e08d27d05 (patch) | |
tree | 4f77606ce27756e4a3a8395097ecec265d7968cf /lib/_ak_utils | |
parent | d4fcb369a26507a1fbaa38789cdfd06c559b8c39 (diff) | |
download | arching-kaos-tools-0238608f85236f0b886f0b53c904d56e08d27d05.tar.gz arching-kaos-tools-0238608f85236f0b886f0b53c904d56e08d27d05.tar.bz2 arching-kaos-tools-0238608f85236f0b886f0b53c904d56e08d27d05.zip |
Directly call the script to avoid populating the logs with too much info
Diffstat (limited to 'lib/_ak_utils')
-rwxr-xr-x | lib/_ak_utils | 7 |
1 files changed, 7 insertions, 0 deletions
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 +} |