Sujet : Re: AI Written Bash Script
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.sys.raspberry-piDate : 12. Dec 2024, 22:14:38
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vjfjnu$2ues6$4@dont-email.me>
References : 1
User-Agent : Pan/0.161 (Chasiv Yar; )
On Thu, 12 Dec 2024 12:43:14 +0000, DrStevenStrange wrote:
... how can I amend the script so it starts 30 minutes BEFORE sunrise
and stops 30 Minutes after?
...
SUNRISE_EPOCH=$(date -d "$SUNRISE" +%s)
SUNSET_EPOCH=$(date -d "$SUNSET" +%s)
How about
SUNRISE_EPOCH=$(($(date -d "$SUNRISE" +%s) - 1800))
SUNSET_EPOCH=$(($(date -d "$SUNSET" +%s) + 1800))