From 13c7d6d3b5e7530dd8f8377ec91106fb99ece2fa Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 22 Apr 2019 15:54:26 -0400 Subject: [PATCH] Convert to localtime The IPMI module returned localtime, be consistent with that behavior. Change-Id: I7a787ffb4b9aac81e54cc20707e97087a97d5d16 --- pyghmi/redfish/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/redfish/command.py b/pyghmi/redfish/command.py index e504e595..a5112121 100644 --- a/pyghmi/redfish/command.py +++ b/pyghmi/redfish/command.py @@ -764,7 +764,6 @@ class Command(object): if currtime: currtime = _parse_time(currtime) now = datetime.now(tz.tzoffset('', 0)) - correction try: correction = now - currtime except TypeError: @@ -801,6 +800,7 @@ class Command(object): for log in entries.get('Members', []): record = {} entime = _parse_time(log.get('Created', '')) + correction + entime = entime.astimezone(tz.gettz()) record['timestamp'] = entime.strftime('%Y-%m-%dT%H:%M:%S') record['message'] = log.get('Message', None) record['severity'] = _healthmap.get(