Skip to content

Commit 493b5ca

Browse files
committed
Improves comments in timestamp implementation
1 parent 42fe233 commit 493b5ca

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • docs_tofupilot/logger/client

docs_tofupilot/logger/client/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ def __init__(self):
1313
self.logs = []
1414

1515
def emit(self, record):
16-
# Format log with ISO-8601 timestamp (millisecond precision) for
17-
# TofuPilot API
16+
# Format log with ISO-8601 timestamp (UTC, ms) for TofuPilot API
1817
log_entry = {
1918
"level": record.levelname,
20-
"timestamp": f"{datetime.fromtimestamp(record.created).isoformat(timespec='milliseconds')}Z",
19+
"timestamp": datetime.utcfromtimestamp(record.created).isoformat(timespec="milliseconds") + "Z",
2120
"message": record.getMessage(),
2221
"source_file": record.filename,
2322
"line_number": record.lineno,

0 commit comments

Comments
 (0)