When reading a BLF file with python-can, the parsed timestamps are always 8 hours later than what is shown in Vector CANoe.
還沒有人認領這個 Issue。
評估
研究方向
從 BLFReader 入口點開始,使用 issue 中的腳本在 CANoe 建立的 BLF 檔案上重現時間戳轉換。將結果與 CANoe 顯示的時間進行比較,並確定預期的時區或偏移行為;對於回報的範例,解析出的時間戳與 CANoe 一致即表示完成。
由索引模型根據 Issue 內容生成。
描述
Describe the bug
When reading a BLF file with python-can, the parsed timestamps are always 8 hours later than what is shown in Vector CANoe.
To Reproduce
1.Create or record a BLF file with CANoe.
2.Open the BLF file in CANoe → check message timestamps (example: 13:00).
3.Open the same BLF file with python-can using the following script:
`import can
import datetime
blf_file = "test.blf"
with can.BLFReader(blf_file) as log:
for msg in log:
t_raw = datetime.datetime.fromtimestamp(msg.timestamp)
print(f"Time: {t_raw}, Relative seconds: {msg.timestamp}")`
4.Observe that the timestamps printed by python-can are +8 hours compared to CANoe (example: 21:00).
Expected behavior
Timestamps should match those shown in CANoe (e.g., 13:00).
Additional context
OS and version:Windows 11
Python version: Python 3.11.7 (tags/v3.11.7:fa7a6f2, Dec 4 2023, 19:24:49) [MSC v.1937 64 bit (AMD64)] on win32
python-can version:python-can 4.6.1
python-can interface/s (if applicable):
Traceback and logs
def func():
return "hello, world!"
- 主要語言
- Python
- 星號
- 1.6k
- 分支
- 697
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
hardbyte/python-can 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 88/100
hardbyte/python-can#2103 ·
-
bug
難度 1/5 1 小時以內 新手友好度 78/100
hardbyte/python-can#2077 · 1 則留言 · 1 個 reaction ·
-
bug
難度 1/5 1 小時以內 新手友好度 68/100
hardbyte/python-can#1922 · 1 個 reaction ·
-
enhancement
難度 5/5 一週以上 新手友好度 30/100
hardbyte/python-can#2102 ·
-
bug
難度 3/5 1-2 天 新手友好度 68/100
hardbyte/python-can#2092 ·
查看 hardbyte/python-can 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
難度 1/5 1-3 小時 新手友好度 88/100
-
documentation
難度 1/5 1 小時以內 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未關閉
難度 1/5 1 小時以內 新手友好度 92/100
-
instance instance add
難度 1/5 1 小時以內 新手友好度 72/100
searxng/searx-instances#939 · 1 則留言 ·
-
area-deployment area-integrations triage:bot-seen
難度 2/5 半天 新手友好度 86/100