mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 07:04:45 -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
|
||||
|
||||
def format(self, record):
|
||||
stamp = datetime.utcfromtimestamp(record.created)
|
||||
stamp = stamp.replace(tzinfo=tzutc())
|
||||
stamp = datetime.fromtimestamp(record.created, tz=tzutc())
|
||||
message = {
|
||||
# Field not included, but exist in related logs
|
||||
# 'path': record.pathname
|
||||
|
||||
Reference in New Issue
Block a user