Skip to content

Commit

Permalink
fix minute-overflow bug in clock formatted times
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate-Wessel committed Jul 10, 2024
1 parent b18a9a8 commit be26ebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/get_travel_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def timeFormat(seconds):
'seconds': round(seconds,3),
'minutes': round(seconds/60,3),
# format travel times in seconds like a clock for humans to read
'clock': f'{math.floor(seconds/3600):02d}:{math.floor(seconds/60):02d}:{round(seconds%60):02d}'
'clock': f'{math.floor(seconds/3600):02d}:{math.floor((seconds/60)%60):02d}:{round(seconds%60):02d}'
}

def get_travel_time(start_node, end_node, start_time, end_time, start_date, end_date, include_holidays, dow_list):
Expand Down

0 comments on commit be26ebe

Please sign in to comment.