-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sunrise/Sunset calculation hangs for a specific Date/lat/long combo #1
Comments
Thanks, I'll look into it. |
Did some research on this today. It looks like it's getting stuck in the "def recalculate_m" (sun_time.rb line 97) loop. I don't really understand what's going on to calculate this and why it's getting stuck here for this particular combo though. |
I couldn't figure out how to patch this so I ended up making a new gem https://github.com/cracell/when_sun based on this one https://github.com/joeyates/ruby-sun-times with a few patches/changes to make it a proper gem. |
I've merged pull request 4, that @beerlington was nice enough to provide. Should fix the issue. I'll try to release a new gem version next week. |
@cjkihlbom Was curious if you're still planning on releasing a new gem this week. |
The calculations for
suntime = SunTime.new(Date.parse("2011-07-21"), 34.2578, -118.757)
suntime.sunrise #Hangs and does not complete
suntime.sunset #hangs and does not complete
Other dates for that latitude/longitude work correctly.
The text was updated successfully, but these errors were encountered: