mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-09-18 21:54:22 +00:00
The published packet payload mixed clocks: "timestamp" was UTC ISO 8601 with a Z suffix, but the "time" and "date" fields beside it were rendered from a naive datetime.now(), i.e. the host's local wall clock. A consumer reading those two off a bot in a non-UTC zone sees a skew of exactly that zone's UTC offset and flags the observer's clock as wrong. Local time was never the intended reading. The original script took time and date off the firmware log line, and mctomqtt sets the device clock from calendar.timegm(), so upstream both fields are already UTC. All three now render one aware UTC instant, so they cannot disagree with each other or straddle a second boundary. _utc_iso_timestamp() takes an optional instant to make that possible; its no-arg behavior is unchanged.