diff --git a/docs_tofupilot/logger/client/main.py b/docs_tofupilot/logger/client/main.py index 595755e..0c3f33f 100644 --- a/docs_tofupilot/logger/client/main.py +++ b/docs_tofupilot/logger/client/main.py @@ -13,11 +13,13 @@ def __init__(self): self.logs = [] def emit(self, record): - # Format log with ISO-8601 timestamp (millisecond precision) for - # TofuPilot API + # Format log with ISO-8601 timestamp (UTC, ms) for TofuPilot API log_entry = { "level": record.levelname, - "timestamp": f"{datetime.fromtimestamp(record.created).isoformat(timespec='milliseconds')}Z", + "timestamp": datetime.utcfromtimestamp(record.created).isoformat( + timespec="milliseconds" + ) + + "Z", "message": record.getMessage(), "source_file": record.filename, "line_number": record.lineno,