]> mj.ucw.cz Git - home-hw.git/commitdiff
BSB Analyser: New format of log lines
authorMartin Mares <mj@ucw.cz>
Sat, 15 Feb 2025 20:23:56 +0000 (21:23 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 15 Feb 2025 20:23:56 +0000 (21:23 +0100)
bsb/analyser/analyse.py

index 86a52c1cbceb4a1af9a2fa63a4229291c01f4b6b..dcd92af2c7f348a73bcac5e273bafafc6e8bcf35 100755 (executable)
@@ -166,8 +166,9 @@ def parse_file(name: str):
     with open(name) as f:
         for line in f:
             fields = line.split()
-            timestamp = int(fields.pop(0))
-            dt = datetime.datetime.fromtimestamp(timestamp)
+            date = fields.pop(0)
+            time = fields.pop(0)
+            dt = datetime.datetime.fromisoformat(f'{date}T{time}')
             values = [int(x, base=16) for x in fields]
             frame = Frame()
             try: