generated from me/template-mit
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:
1 parent
35db6c2c5f
commit
1fc42b4e4e
1 file changed
+1
-1
+1
-1
@@ -74,7 +74,7 @@ fetch_sunset_time() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Extract sunset timestamp like "2025-06-15T19:32:00"
|
# 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
|
if [ -z "$SUNSET_RAW" ]; then
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in new issue
Block a user