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

Offset not working #47

Closed thomarse-ef closed 3 months ago

thomarse-ef commented 3 months ago

Offset doesn't allow me to schedule things for before a twilight event: sunwait list sunset offset -00:30:00 51.48523N 2.56268W produces 21:56, as does sunwait list sunset offset +00:30:00 51.48523N 2.56268W and sunwait list sunset offset 00:30:00 51.48523N 2.56268W. FYI sunset at this location today is 21:26. Am I doing something wrong or is this a bug?

davidsanner commented 3 months ago

I'm seeing another issue with offset. 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.

thomarse-ef commented 3 months ago

I just tried this on a fresh install, issue seems to be resolved. Not sure what happened there :)