Skip Menu |

This queue is for tickets about the DateTime-Event-Sunrise CPAN distribution.

Report information
The Basics
Id: 110016
Status: patched
Priority: 0/
Queue: DateTime-Event-Sunrise

Owner: Nobody in particular
Requestors: J2N-FORGET [...]

Bug Information
Severity: Important
Broken in: 0.0504
Fixed in: 0.0505

Subject: make sure loops are exited eventually
Download (untitled) / with headers
text/plain 919b
Same bug as in Astro::Sunrise See Bug report for Astro::Sunrise: We ( found two edge cases were the calculation got stuck in an endless loop. Test case sunrise(2015,11,28, 177 , -37.66667 , 0, 0, 6, 1) It get stuck for Nov/28 and Nov/29, but it's fine for all other days. For the days I tested the loops were run 3 times so setting the maximum iterations to 100 seems reasonable. My answer, same as Astro::Sunrise: Actually, I am not sure that the original writer of the module has implemented the iterative algorithm in the proper way. In other words, I think it is buggy. It does not matter much if your location is far from the qr/(ant)?arctic/ circle, but your test case shows that it must be fixed even for temperate locations. I will use your pull request for an emergency fix and later I will analyse the iterative algorithm.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to