Optimize terminal detail loading and Redis replay

This commit is contained in:
2569718930@qq.com
2026-05-31 04:32:48 +08:00
parent 2a6d8748f4
commit 46effcd45f
16 changed files with 948 additions and 80 deletions
+14 -1
View File
@@ -99,8 +99,21 @@ def add_signal(
def parse_utc_datetime(value: Any) -> Optional[datetime]:
raw = str(value or "").strip()
if not raw or "T" not in raw:
if not raw:
return None
if "T" not in raw:
try:
epoch = float(raw)
except Exception:
return None
if epoch <= 1_000_000_000:
return None
if epoch > 10_000_000_000:
epoch = epoch / 1000.0
try:
return datetime.fromtimestamp(epoch, tz=timezone.utc)
except Exception:
return None
try:
dt = datetime.fromisoformat(raw.replace("Z", "+00:00"))
except Exception: