mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 13:36:02 -03:30
Always use a tz aware timestamp
* https://sonarcloud.io/project/issues?open=AZDmRade2PiUXMD3dXnx&id=ansible_awx
This commit is contained in:
committed by
Chris Meyers
parent
5aa3e8cf3b
commit
e3ac581fdf
@@ -257,8 +257,7 @@ class LogstashFormatter(LogstashFormatterBase):
|
|||||||
return fields
|
return fields
|
||||||
|
|
||||||
def format(self, record):
|
def format(self, record):
|
||||||
stamp = datetime.utcfromtimestamp(record.created)
|
stamp = datetime.fromtimestamp(record.created, tz=tzutc())
|
||||||
stamp = stamp.replace(tzinfo=tzutc())
|
|
||||||
message = {
|
message = {
|
||||||
# Field not included, but exist in related logs
|
# Field not included, but exist in related logs
|
||||||
# 'path': record.pathname
|
# 'path': record.pathname
|
||||||
|
|||||||
Reference in New Issue
Block a user