This commit is contained in:
albert 2024-06-18 13:05:03 +09:00
parent 73b3ffc1be
commit 0de3fdf7f3
Signed by: albert
GPG key ID: 3895DD267CA11BA9

View file

@ -54,11 +54,9 @@
systemctl --user start get-theme-times.service systemctl --user start get-theme-times.service
fi fi
echo "Getting dates:" echo "Getting dates:"
sr=$(cat /tmp/wttr.sunrise) SUNRISE=`date --date"$(cat /tmp/wttr.sunset)" +%s`
ss=$(cat /tmp/wttr.sunset)
SUNRISE=`date -d $sr +%s`
echo "Sunrise: $SUNRISE" echo "Sunrise: $SUNRISE"
SUNSET=`date -d $ss +%s` SUNSET=`date --date="$(cat /tmp/wttr.sunset)" +%s`
echo "Sunset: $SUNSET" echo "Sunset: $SUNSET"
CURRENT=`date +%s` CURRENT=`date +%s`
echo "Current: $CURRENT" echo "Current: $CURRENT"