Does anybody know if there is a Linux script knocking around rather than a windows .exe?
I use the following BASH script to do that on my Synology NAS. It runs every day and calculates sunrise-20min and sunset+20min. It then configures start/stop of night mode. You'll have to provide your own password and ip addresses. If all you want to do is adjust the sunset/sunrise this is all you need. Probably running it once a week is close enough.
It also sleeps until sunset+19Min. On one of my cameras I manually set "Normal" mode at sunset+20 and then at midnight another script switches it to night mode - this to deal with landscape lighting that runs until midnight. With minor modification it should work on any flavor of Linux (including MacOS)
!/bin/bash
location="AUS"
# we get all the web page
allfile=$( wget -qO- '
# we get the original sunrise/sunset time values
sunrise_str=$(echo $allfile | sed -ne '/Sunrise/{s/.<Sunrise>\(.\)<\/Sunrise>.*/\1/p;q;}')
sunset_str=$(echo $allfile | sed -ne '/Sunset/{s/.<Sunset>\(.\)<\/Sunset>.*/\1/p;q;}')
# we convert time values to Time in 24-hour format
sunset=$(date --date="$sunset_str +20 minutes" +%T)
sunrise=$(date --date="$sunrise_str -20 minutes" +%T)
sunsetsec=$(date --date="$sunset_str +19 minutes" +%s)
/usr/bin/curl -s -g --digest -u adminassword "{sunrise}-${sunset}" >> timechange.log
now=$(date)
nowsec=$(date +%s)
sleeptime=$(( sunsetsec - nowsec ))
echo "$now Setting sunrise $sunrise, sunset $sunset in $sleeptime seconds" >> timechange.log
sleep $sleeptime
# insert code here to run at sunset +19 minutes