mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01:00
Return precisely 86400 seconds for a full day
This commit is contained in:
parent
99b49e3f39
commit
cec1035c2d
@ -229,5 +229,9 @@ def daily_time_spent_calculation(earliest, latest, open_hours):
|
|||||||
|
|
||||||
day_delta = latest - earliest
|
day_delta = latest - earliest
|
||||||
|
|
||||||
# returns up to 86399 seconds
|
# returns up to 86399 seconds, add one second if full day
|
||||||
return day_delta.seconds
|
time_spent_seconds = day_delta.seconds
|
||||||
|
if time_spent_seconds == 86399:
|
||||||
|
time_spent_seconds += 1
|
||||||
|
|
||||||
|
return time_spent_seconds
|
Loading…
Reference in New Issue
Block a user