Explicitly ask for current day.

This commit is contained in:
me committed 2026-11-01 06:08:26 -07:00
1 parent 9cc194fcb4
commit 7d9bc589c5
1 file changed
+4 -1
+4 -1
View File
@@ -100,8 +100,11 @@ fetch_sunset_time() {
echo "Checking for sunset time of lat:long ${LATLONG}."
LAT=$(echo "$LATLONG" | cut -d: -f1)
LON=$(echo "$LATLONG" | cut -d: -f2)
TODAY="`date +'%Y-%m-%d'`"
REQUEST="https://api.open-meteo.com/v1/forecast?latitude=${LAT}&longitude=${LON}&timezone=auto&daily=sunset&date=today"
#REQUEST="https://api.open-meteo.com/v1/forecast?latitude=${LAT}&longitude=${LON}&timezone=auto&daily=sunset&date=today"
#REQUEST="https://api.open-meteo.com/v1/forecast?latitude=${LAT}&longitude=${LON}&timezone=auto&daily=sunset&forecast_days=1"
REQUEST="https://api.open-meteo.com/v1/forecast?latitude=${LAT}&longitude=${LON}&timezone=auto&daily=sunset&start_date=${TODAY}&end_date=${TODAY}"
RESPONSE=$(curl -s "$REQUEST")
if [ -z "$RESPONSE" ]; then