Don't forget the text output renderer for the datetime type.

This commit is contained in:
Mike Auty
2018-03-08 01:34:55 +00:00
parent db6e32bba3
commit 6d618903d5
+2
View File
@@ -1,3 +1,4 @@
import datetime
import sys
import typing
@@ -43,6 +44,7 @@ class QuickTextRenderer(interfaces.renderers.Renderer):
format_hints.Hex: Optional(lambda x: "0x{:x}".format(x)),
format_hints.HexBytes: Optional(hex_bytes_as_text),
bytes: Optional(lambda x: x.decode("utf-8")),
datetime.datetime: Optional(lambda x: x.strftime("%Y-%m-%d %H:%M:%S.%f %Z")),
'default': Optional(lambda x: "{}".format(x))}
def __init__(self, options = None) -> None: