From 7ff0b6b368f22e580b4e03ad881d32d0edd599fe Mon Sep 17 00:00:00 2001 From: J <91372088+jarelllama@users.noreply.github.com> Date: Thu, 26 Dec 2024 12:46:36 +0800 Subject: [PATCH] readme: fix bug regarding timeframe variables --- scripts/update_readme.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/update_readme.sh b/scripts/update_readme.sh index 55d3d47bd..58eec3006 100644 --- a/scripts/update_readme.sh +++ b/scripts/update_readme.sh @@ -153,7 +153,8 @@ EOF readonly FUNCTION='bash scripts/tools.sh' readonly SOURCE_LOG='config/source_log.csv' readonly DOMAIN_LOG='config/domain_log.csv' -readonly TODAY THIS_MONTH +readonly TODAY +readonly THIS_MONTH TODAY="$(TZ=Asia/Singapore date +"%d-%m-%y")" THIS_MONTH="$(TZ=Asia/Singapore date +"%m-%y")" @@ -166,7 +167,8 @@ print_stats() { printf "%5s |%8s |%7s %% |%8s %% | %s" \ "$(sum "$TODAY" "$1")" "$this_month" \ - "$(( this_month * 100 / total_this_month ))" "$(sum_excluded "$1" )" "${1:-All sources}" + "$(( this_month * 100 / total_this_month ))" \ + "$(sum_excluded "$1" )" "${1:-All sources}" } # Note that csvkit is used in the following functions as the Google Search