fixes for the get_sun function

Tweaking the get_sun function, corrections for sunsets and sunrises occurring on different days, hour tweaking.