Fix miliseconds
authorOrakaro <nhatminh_179@hotmail.com>
Thu, 21 Nov 2019 10:24:46 +0000 (19:24 +0900)
committerOrakaro <nhatminh_179@hotmail.com>
Thu, 21 Nov 2019 10:24:46 +0000 (19:24 +0900)
rainbowstream/draw.py
rainbowstream/rainbow.py

index 215bfb3a0e6659c0d34bc5a2f8814f70682f57c8..2fcdeb41bca7bb18ae76fe95e60672d11ed642db 100644 (file)
@@ -487,8 +487,7 @@ def print_right_message(m):
         printNicely(screen_line)
     printNicely(dotline)
     # Format clock
-    date = parser.parse(m['created_at'])
-    date = arrow.get(date).to('local').datetime
+    date = arrow.get(int(m['created_at'])/1000).to('local').datetime # Read Unixtime in miliseconds
     clock_format = '%Y/%m/%d %H:%M:%S'
     try:
         clock_format = c['FORMAT']['MESSAGE']['CLOCK_FORMAT']
index c42437b0f039cd49d5f57ad6c6370ed8501806ff..822f3bb110597c050e669cbab4282834ae00b0e0 100644 (file)
@@ -839,7 +839,7 @@ def inbox():
     messages = t.direct_messages.events.list()['events']
     messages = list(map(map_message, messages))
     inbox = list(filter(inboxFilter, messages))
-    sent = list(filter(inboxFilter, messages))
+    sent = list(filter(sentFilter, messages))
 
     d = {}
     uniq_inbox = list(set(