Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 93b20ef

Browse files
fix: add the actual utc time
1 parent b5544c6 commit 93b20ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

utils/logging_configuration.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ class BaseLogger(JsonFormatter):
99
def add_fields(self, log_record, record, message_dict):
1010
super(BaseLogger, self).add_fields(log_record, record, message_dict)
1111

12-
log_record["utctime"] = log_record.get('asctime')
12+
asctime_format = '%Y-%m-%d %H:%M:%S,%f'
13+
asctime = datetime.strptime(log_record.get('asctime'), asctime_format)
14+
15+
log_record["utctime"] = asctime.isoformat()
1316

1417
def format_json_on_new_lines(self, json_str):
1518
# Parse the input JSON string

0 commit comments

Comments
 (0)