Fix the sed which was getting the sunset time format and failing rather than the actual time (since sunset is mentioned twice in the response).

This commit is contained in:
me committed 2026-10-29 19:36:15 -07:00
1 parent 35db6c2c5f
commit 1fc42b4e4e
1 file changed
+1 -1
+1 -1
View File
@@ -74,7 +74,7 @@ fetch_sunset_time() {
fi
# Extract sunset timestamp like "2025-06-15T19:32:00"
SUNSET_RAW=$(echo "$RESPONSE" | grep -o '"sunset":"[^"]*"' | head -1 | sed 's/.*://"//;s/"$//')
SUNSET_RAW=$(echo "$RESPONSE" | jq -r '.daily.sunset[0]')
if [ -z "$SUNSET_RAW" ]; then
return 1