mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-26 01:01:40 +00:00
OpenClaw session imports can leave ISO-8601 timestamps in SessionDB rows. Normalize legacy string timestamps before rendering or comparing session activity so session listing and resume surfaces do not crash on imported history.
10 lines
244 B
Python
10 lines
244 B
Python
import time
|
|
|
|
from hermes_cli.main import _relative_time
|
|
|
|
|
|
def test_relative_time_accepts_iso_timestamps():
|
|
ts = time.time() - 7200
|
|
iso = time.strftime("%Y-%m-%dT%H:%M:%S", time.localtime(ts))
|
|
|
|
assert _relative_time(iso) == "2h ago"
|