aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--quarg/quassel/formatter.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/quarg/quassel/formatter.py b/quarg/quassel/formatter.py
index 603e113..7e7bce6 100644
--- a/quarg/quassel/formatter.py
+++ b/quarg/quassel/formatter.py
@@ -34,10 +34,11 @@ def format_from(backlog_row):
message = Message.from_backlog(backlog_row)
formatter = FORMATTERS[message.type]
- # make sure to convert timestamps to local time before printing
- timestamp = message.time.astimezone().isoformat(sep=' ', timespec='seconds')
+ return f'{format_timestamp(message.time)}\t{message.buffer}\t{formatter(message)}'
- return f'{timestamp}\t{message.buffer}\t{formatter(message)}'
+def format_timestamp(time):
+ # make sure to convert timestamps to local time
+ return time.astimezone().strftime('%Y-%m-%d %H:%M:%S')
def format_part(msg):
if msg.message: