From a899fc0917b254ddc050f916c0479507aa8373fe Mon Sep 17 00:00:00 2001 From: celso Date: Fri, 31 Mar 2023 01:54:37 -0300 Subject: [PATCH] formatted timestamp correctly --- bashbot-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashbot-lib.sh b/bashbot-lib.sh index 2fe8493..f6e964b 100755 --- a/bashbot-lib.sh +++ b/bashbot-lib.sh @@ -114,7 +114,7 @@ getcbk_data() { gettimestamp() { local timestamp="$(tail -n 1 "${bot_tmpdir}${1}"\ | grep "\"date\"" | grep -om1 "\"date\":[0-9]\+,")" - [ ! -z "${timestamp}" ] && printf "%s" "${timestamp:7:-1}" + [ ! -z "${timestamp}" ] && date "+%D %H:%M" -d "@${timestamp:7:-1}" } # $1 is name of a bash array with the number of columns in every row such as ( 1 1 3 ) for a 3 row keyboard in which the first and second row have 1 column, and the third has 3