From 5c753ff5ec79f559cfe8670277207ec51138e0fd Mon Sep 17 00:00:00 2001 From: Michael Bradley Date: Thu, 27 Mar 2025 01:12:14 -0400 Subject: [PATCH] Don't pad H/M/S from `date` Caused occasional script failures, was it trying to interpret as octal? --- scripts/sunset.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/sunset.sh b/scripts/sunset.sh index 873db0f..ebdcc4e 100755 --- a/scripts/sunset.sh +++ b/scripts/sunset.sh @@ -9,7 +9,7 @@ SUNSET_END="$((23 * 60 * 60))" # When to reach min temperature DAY_TEMP="6000" # Display temperature (K) to use in full daylight NIGHT_TEMP="2400" # Display temperature (K) to use at night -CURRENT="$(((($(date '+%H') * 60) + $(date '+%M')) * 60 + $(date '+%S')))" # Time in seconds since start of day +CURRENT="$(((($(date '+%-H') * 60) + $(date '+%-M')) * 60 + $(date '+%-S')))" # Time in seconds since start of day # Performs a calculation using an argument containing an input string calc() {