summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/py/homekit/util.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/py/homekit/util.py b/include/py/homekit/util.py
index f267488..78a78a0 100644
--- a/include/py/homekit/util.py
+++ b/include/py/homekit/util.py
@@ -12,7 +12,7 @@ import re
import os
from enum import Enum
-from datetime import datetime, timedelta
+from datetime import datetime
from typing import Optional, List
from zlib import adler32
@@ -256,8 +256,7 @@ def filesize_fmt(num, suffix="B") -> str:
def seconds_to_human_readable_string(seconds: int) -> str:
- duration = timedelta(seconds=seconds)
- days, remainder = divmod(duration.total_seconds(), 86400)
+ days, remainder = divmod(seconds, 86400)
hours, remainder = divmod(remainder, 3600)
minutes, seconds = divmod(remainder, 60)