generated from me/template-mit
Explicitly ask for current day.
This commit is contained in:
1 parent
9cc194fcb4
commit
7d9bc589c5
1 file changed
+4
-1
+4
-1
@@ -100,8 +100,11 @@ fetch_sunset_time() {
|
|||||||
echo "Checking for sunset time of lat:long ${LATLONG}."
|
echo "Checking for sunset time of lat:long ${LATLONG}."
|
||||||
LAT=$(echo "$LATLONG" | cut -d: -f1)
|
LAT=$(echo "$LATLONG" | cut -d: -f1)
|
||||||
LON=$(echo "$LATLONG" | cut -d: -f2)
|
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")
|
RESPONSE=$(curl -s "$REQUEST")
|
||||||
|
|
||||||
if [ -z "$RESPONSE" ]; then
|
if [ -z "$RESPONSE" ]; then
|
||||||
|
|||||||
Reference in new issue
Block a user