From cec1035c2d58fadb2553a1e5712edfb3002f4400 Mon Sep 17 00:00:00 2001 From: Sam Splunks <72095718+samsplunks@users.noreply.github.com> Date: Thu, 15 Feb 2024 09:18:36 +0000 Subject: [PATCH] Return precisely 86400 seconds for a full day --- helpdesk/lib.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/helpdesk/lib.py b/helpdesk/lib.py index 2edbaebd..b94eaf50 100644 --- a/helpdesk/lib.py +++ b/helpdesk/lib.py @@ -229,5 +229,9 @@ def daily_time_spent_calculation(earliest, latest, open_hours): day_delta = latest - earliest - # returns up to 86399 seconds - return day_delta.seconds \ No newline at end of file + # returns up to 86399 seconds, add one second if full day + time_spent_seconds = day_delta.seconds + if time_spent_seconds == 86399: + time_spent_seconds += 1 + + return time_spent_seconds \ No newline at end of file