From 2e6dc8ada647ebe5de9c3361dfe809c119b85c8b Mon Sep 17 00:00:00 2001 From: kaotisk Date: Tue, 10 Dec 2024 02:02:00 +0200 Subject: Bug fix for date program differences between linux and BSD --- lib/_ak_log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/_ak_log') diff --git a/lib/_ak_log b/lib/_ak_log index 7f832d8..a3ee259 100755 --- a/lib/_ak_log +++ b/lib/_ak_log @@ -8,7 +8,7 @@ _ak_log_print_log_line(){ messagetype="$(echo "$*" | awk '{print $3}')" message="$(echo "$*" | cut -d ' ' -f4-)" printf '%s \033[1;32m%s\033[0;00m \033[1;31m%s\033[0;00m %s\n' \ - "$(date --date=@$timestamp +%Y%m%d_%H%M%S)" \ + "$(date --date=@$timestamp +%Y%m%d_%H%M%S 2>/dev/null || date -r $timestamp +%Y%m%d_%H%M%S 2>/dev/null)" \ "$program" \ "$messagetype" \ "$message" -- cgit v1.2.3