Commit 0fdbe02e authored by Federico Sismondi's avatar Federico Sismondi

fixed message's timestamp representation when using CLI

parent 2b2d0398
...@@ -5,6 +5,7 @@ import pika ...@@ -5,6 +5,7 @@ import pika
import errno import errno
import base64 import base64
import logging import logging
import datetime
import threading import threading
import traceback import traceback
...@@ -1214,8 +1215,9 @@ def _echo_frames_as_table(frames: list): ...@@ -1214,8 +1215,9 @@ def _echo_frames_as_table(frames: list):
for frame in frames: for frame in frames:
table = [] table = []
assert type(frame) is dict 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 id', frame['id']))
table.append(('frame timestamp', frame['timestamp'])) table.append(('frame timestamp', timestamp))
table.append(('frame error', frame['error'])) table.append(('frame error', frame['error']))
# frame header print # frame header print
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment