From 0fdbe02e9d8486ef900d54f6134b00091589abbd Mon Sep 17 00:00:00 2001 From: Federico Sismondi Date: Mon, 9 Jul 2018 15:01:49 +0200 Subject: [PATCH] fixed message's timestamp representation when using CLI --- ioppytest_cli/ioppytest_cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ioppytest_cli/ioppytest_cli.py b/ioppytest_cli/ioppytest_cli.py index 526c51b..4fa2bbb 100644 --- a/ioppytest_cli/ioppytest_cli.py +++ b/ioppytest_cli/ioppytest_cli.py @@ -5,6 +5,7 @@ import pika import errno import base64 import logging +import datetime import threading import traceback @@ -1214,8 +1215,9 @@ def _echo_frames_as_table(frames: list): for frame in frames: table = [] assert type(frame) is dict + timestamp = datetime.datetime.fromtimestamp(int(frame['timestamp'])).strftime('%Y-%m-%d %H:%M:%S') table.append(('frame id', frame['id'])) - table.append(('frame timestamp', frame['timestamp'])) + table.append(('frame timestamp', timestamp)) table.append(('frame error', frame['error'])) # frame header print -- 2.24.1