2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-15 04:07:48 +00:00

Fix event log date processing

Event log was incorrectly processing.

Change-Id: Ibaac463eb9ca537daa818ac60da1539f41e72c61
This commit is contained in:
Jarrod Johnson 2019-07-25 14:39:13 -04:00
parent 9d028dbde5
commit f1e9ecf15c

View File

@ -1338,10 +1338,9 @@ class Command(object):
if parsedtime:
entime = parsedtime + correction
entime = entime.astimezone(ltz)
entime = entime.strftime('%Y-%m-%dT%H:%M:%S')
record['timestamp'] = entime.strftime('%Y-%m-%dT%H:%M:%S')
else:
record['timestamp'] = log.get('Created', '')
record['timestamp'] = entime.strftime('%Y-%m-%dT%H:%M:%S')
record['message'] = log.get('Message', None)
record['severity'] = _healthmap.get(
entries.get('Severity', 'Warning'), const.Health.Critical)