Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PCAN timestamp #1651

Merged
merged 2 commits into from
Sep 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions can/interfaces/pcan/pcan.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import platform
import time
import warnings
from datetime import datetime
from typing import Any, List, Optional, Tuple, Union

from packaging import version
Expand Down Expand Up @@ -85,7 +84,7 @@
if uptime.boottime() is None:
boottimeEpoch = 0
else:
boottimeEpoch = (uptime.boottime() - datetime.fromtimestamp(0)).total_seconds()
boottimeEpoch = uptime.boottime().timestamp()
except ImportError as error:
log.warning(
"uptime library not available, timestamps are relative to boot time and not to Epoch UTC",
Expand Down