fetch-calendar: set start time to 6 h in the past #49

Merged
june merged 1 commit from feature/calendar into main 2024-02-13 19:17:01 +01:00
Showing only changes of commit 25b9ac168d - Show all commits

View file

@ -7,10 +7,10 @@ OUTFILE=data/calendar.json
# See here for uname -s outputs: https://en.wikipedia.org/wiki/Uname#Examples # See here for uname -s outputs: https://en.wikipedia.org/wiki/Uname#Examples
OS_TYPE=$(uname -s) OS_TYPE=$(uname -s)
if [ "$OS_TYPE" = "Linux" ]; then if [ "$OS_TYPE" = "Linux" ]; then
START_TIME=$(date --date="-1 day" +%s) # yesterday START_TIME=$(date --date="-6 hours" +%s) # now - 6 hours
END_TIME=$(date --date="+1 month" +%s) # now + 1 month END_TIME=$(date --date="+1 month" +%s) # now + 1 month
elif [ "$OS_TYPE" = "Darwin" ] || [ "$OS_TYPE" = "FreeBSD" ]; then elif [ "$OS_TYPE" = "Darwin" ] || [ "$OS_TYPE" = "FreeBSD" ]; then
START_TIME=$(date -v-1d +%s) # yesterday START_TIME=$(date -v-6H +%s) # now - 6 hours
END_TIME=$(date -v+1m +%s) # now + 1 month END_TIME=$(date -v+1m +%s) # now + 1 month
else else
echo "ERROR: Unsupported OS type" echo "ERROR: Unsupported OS type"