mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 15:33:09 +01:00
Adding second precision for float conversion
This commit is contained in:
parent
05dfde59cb
commit
c3f6a1caa2
@ -214,8 +214,8 @@ def daily_time_spent_calculation(earliest, latest, open_hours):
|
||||
end_hour, end_minute, end_second = int(end), int(end % 1 * 60), int(end * 60 % 1 * 60)
|
||||
|
||||
# translate time for delta calculation
|
||||
earliest_f = earliest.hour + earliest.minute / 60
|
||||
latest_f = latest.hour + latest.minute / 60
|
||||
earliest_f = earliest.hour + earliest.minute / 60 + earliest.second / 3600
|
||||
latest_f = latest.hour + latest.minute / 60 + latest.second / 3600
|
||||
|
||||
if earliest_f < start:
|
||||
earliest = earliest.replace(hour=start_hour, minute=start_minute, second=start_second)
|
||||
|
Loading…
Reference in New Issue
Block a user