From eb9d947dd60f750b58aa711c8115adabf04c8cf8 Mon Sep 17 00:00:00 2001 From: Sam Splunks <72095718+samsplunks@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:33:20 +0000 Subject: [PATCH] Update comments --- helpdesk/lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpdesk/lib.py b/helpdesk/lib.py index 15e417f3..2edbaebd 100644 --- a/helpdesk/lib.py +++ b/helpdesk/lib.py @@ -197,7 +197,7 @@ def convert_value(value): def daily_time_spent_calculation(earliest, latest, open_hours): - """Returns timedelta for a single day time interval according to open hours.""" + """Returns the number of seconds for a single day time interval according to open hours.""" # avoid rendering day in different locale weekday = ('monday', 'tuesday', 'wednesday', 'thursday', @@ -209,7 +209,7 @@ def daily_time_spent_calculation(earliest, latest, open_hours): if not 0 <= start <= end <= MIDNIGHT: start, end = 0, MIDNIGHT - # transform decimals to minutes + # transform decimals to minutes and seconds start_hour, start_minute, start_second = int(start), int(start % 1 * 60), int(start * 60 % 1 * 60) end_hour, end_minute, end_second = int(end), int(end % 1 * 60), int(end * 60 % 1 * 60)