Skip to content

Commit 40c7791

Browse files
authored
Fix PCAN timestamp (#1651)
* fix PCAN timestamp * remove unused datetime import
1 parent 4b17b9c commit 40c7791

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

can/interfaces/pcan/pcan.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import platform
66
import time
77
import warnings
8-
from datetime import datetime
98
from typing import Any, List, Optional, Tuple, Union
109

1110
from packaging import version
@@ -85,7 +84,7 @@
8584
if uptime.boottime() is None:
8685
boottimeEpoch = 0
8786
else:
88-
boottimeEpoch = (uptime.boottime() - datetime.fromtimestamp(0)).total_seconds()
87+
boottimeEpoch = uptime.boottime().timestamp()
8988
except ImportError as error:
9089
log.warning(
9190
"uptime library not available, timestamps are relative to boot time and not to Epoch UTC",

0 commit comments

Comments
 (0)