File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -507,7 +507,7 @@ pub fn sun_timings(
507507 let ( sunset, sunrise) = ( sunset. with_timezone ( & Local ) , sunrise. with_timezone ( & Local ) ) ;
508508 let sunset = Time :: new ( ( sunset. hour ( ) * 60 ) + sunset. minute ( ) ) ;
509509 let sunrise = Time :: new ( ( sunrise. hour ( ) * 60 ) + sunrise. minute ( ) ) ;
510- let step_time_day = Time :: new ( ( sunset. total_mins - sunrise. total_mins ) / ( dir_count_day - 1 ) ) ;
510+ let step_time_day = Time :: new ( ( sunset. total_mins - sunrise. total_mins ) / ( dir_count_day) ) ;
511511 let step_time_night =
512512 Time :: new ( ( 1440 - ( sunset. total_mins - sunrise. total_mins ) ) / dir_count_night) ;
513513 let mut loop_time_night: Time ;
@@ -521,7 +521,8 @@ pub fn sun_timings(
521521 }
522522 loop_time_day += step_time_day;
523523 }
524- loop_time_night = sunset. to_owned ( ) + step_time_night;
524+ times. pop ( ) ;
525+ loop_time_night = sunset. to_owned ( ) ;
525526
526527 while loop_time_night < ( sunrise + FULL_DAY ) {
527528 if loop_time_night >= FULL_DAY {
You can’t perform that action at this time.
0 commit comments