risacher / sunwait

Sunwait calculates sunrise or sunset times with civil, nautical, astronomical and custom twilights, for use with Windows Task Scheduler or 'cron' on Linux.
GNU General Public License v3.0
193 stars 45 forks source link

Negative offset breaks if wait is over an hour past midnight #48

Open davidsanner opened 3 months ago

davidsanner commented 3 months ago

In a 'wait' usage, if a negative offset pushes the wait over an hour past midnight, it returns before it should (immediately).

example: sun sets @ 8:30pm and run at 4pm.
works / waits:  sunwait wait daylight offset -3:00 set
doesn't wait:   sunwait wait daylight offset -5:00 set

2nd example has the wait going over an hour into the next day so fails, returns immediately. So... works in winter, breaks in summer ;)