mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 23:43:11 +01:00
Using MIDNIGHT constant instead of number
This commit is contained in:
parent
1d8fc2ad42
commit
acecc41ec8
@ -220,7 +220,7 @@ def daily_time_spent_calculation(earliest, latest, open_hours):
|
|||||||
latest_f = latest.hour + latest.minute / 60 + latest.second / (60 * 60) + latest.microsecond / (60 * 60 * 999999)
|
latest_f = latest.hour + latest.minute / 60 + latest.second / (60 * 60) + latest.microsecond / (60 * 60 * 999999)
|
||||||
|
|
||||||
# if latest time is midnight and close hour is midnight, add a second to the time spent
|
# if latest time is midnight and close hour is midnight, add a second to the time spent
|
||||||
if latest_f >= 24 and end == MIDNIGHT:
|
if latest_f >= MIDNIGHT and end == MIDNIGHT:
|
||||||
time_spent_seconds += 1
|
time_spent_seconds += 1
|
||||||
|
|
||||||
if earliest_f < start:
|
if earliest_f < start:
|
||||||
|
Loading…
Reference in New Issue
Block a user