diff --git a/awx/main/utils/formatters.py b/awx/main/utils/formatters.py index 5cf5e17a29..45ff3f0d95 100644 --- a/awx/main/utils/formatters.py +++ b/awx/main/utils/formatters.py @@ -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