Skip to content

Commit 165ee4c

Browse files
committed
Update neovi_bus.py
1 parent f464cd6 commit 165ee4c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

can/interfaces/ics_neovi/neovi_bus.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import logging
1313
import os
1414
import tempfile
15-
import time
1615
from collections import Counter, defaultdict, deque
16+
from datetime import datetime
1717
from functools import partial
1818
from itertools import cycle
1919
from threading import Event
@@ -69,8 +69,8 @@ def __exit__(self, exc_type, exc_val, exc_tb):
6969
open_lock = FileLock(os.path.join(tempfile.gettempdir(), "neovi.lock"))
7070
description_id = cycle(range(1, 0x8000))
7171

72-
ICS_EPOCH = time.strptime("1/1/2007", "%m/%d/%Y")
73-
ICS_EPOCH_DELTA = time.mktime(ICS_EPOCH) - time.mktime(time.gmtime(0))
72+
ICS_EPOCH = datetime.fromisoformat("2007-01-01")
73+
ICS_EPOCH_DELTA = (ICS_EPOCH - datetime.fromisoformat("1970-01-01")).total_seconds()
7474

7575

7676
class ICSApiError(CanError):

0 commit comments

Comments
 (0)