This commit is contained in:
taizan-hokuto
2020-11-15 16:53:03 +09:00
parent e4ddbaf8ae
commit 93127a703c

View File

@@ -1,4 +1,4 @@
from datetime import datetime, timedelta, timezone from datetime import datetime
class Author: class Author:
@@ -90,8 +90,7 @@ class BaseRenderer:
self.chat.author.badgeUrl = badge["liveChatAuthorBadgeRenderer"]["customThumbnail"]["thumbnails"][0]["url"] self.chat.author.badgeUrl = badge["liveChatAuthorBadgeRenderer"]["customThumbnail"]["thumbnails"][0]["url"]
def get_datetime(self, timestamp): def get_datetime(self, timestamp):
jst = timezone(timedelta(hours=9)) dt = datetime.fromtimestamp(timestamp / 1000000)
dt = datetime.fromtimestamp(timestamp / 1000000, jst)
return dt.strftime('%Y-%m-%d %H:%M:%S') return dt.strftime('%Y-%m-%d %H:%M:%S')
def get_chatobj(self): def get_chatobj(self):