We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42fe233 commit 493b5caCopy full SHA for 493b5ca
1 file changed
docs_tofupilot/logger/client/main.py
@@ -13,11 +13,10 @@ def __init__(self):
13
self.logs = []
14
15
def emit(self, record):
16
- # Format log with ISO-8601 timestamp (millisecond precision) for
17
- # TofuPilot API
+ # Format log with ISO-8601 timestamp (UTC, ms) for TofuPilot API
18
log_entry = {
19
"level": record.levelname,
20
- "timestamp": f"{datetime.fromtimestamp(record.created).isoformat(timespec='milliseconds')}Z",
+ "timestamp": datetime.utcfromtimestamp(record.created).isoformat(timespec="milliseconds") + "Z",
21
"message": record.getMessage(),
22
"source_file": record.filename,
23
"line_number": record.lineno,
0 commit comments