With the help of @105437 I was able to reproduce the issue and find a solution. In this case I think my initial suspicion was right. It seems that with the code library I was using for sunrise/sunset calculation, if you use UTC timestamps and the event (sunset in this case) is near midnight, it could trigger this issue. Fortunately using timestamps in local time seems to solve the issue.
Version 1.7 is released.
Version 1.7 is released.