Strip timezone and microsecond for admin guild member list

This commit is contained in:
Jeremy Zhang 2017-09-06 18:56:52 +00:00
parent 7badfea64f
commit 2f552ca87f

View File

@ -78,7 +78,7 @@ def cosmetics_patch():
def prepare_guild_members_list(members, bans): def prepare_guild_members_list(members, bans):
all_users = [] all_users = []
ip_pool = [] ip_pool = []
members = sorted(members, key=lambda k: datetime.datetime.strptime(str(k.last_timestamp), "%Y-%m-%d %H:%M:%S"), reverse=True) members = sorted(members, key=lambda k: datetime.datetime.strptime(str(k.last_timestamp.replace(tzinfo=None, microsecond=0)), "%Y-%m-%d %H:%M:%S"), reverse=True)
for member in members: for member in members:
user = { user = {
"id": member.id, "id": member.id,