Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Commit e4cc103

Browse files
committed
fix: Parse ms scale timestamps accurately preventing year out-of-range crash
1 parent e6e8cbb commit e4cc103

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

python/server.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,8 @@ async def websocket_handler(request):
502502
name_without_ext = os.path.splitext(filename)[0]
503503
parts = name_without_ext.split('_')
504504
parsed_ts = float(parts[-1])
505+
if parsed_ts > 9999999999: # If it's in milliseconds (13 digits) instead of seconds (10 digits)
506+
parsed_ts /= 1000.0
505507
timestamp_sec = parsed_ts
506508
except Exception:
507509
pass

0 commit comments

Comments
 (0)