From 2f552ca87fa49d259d9a885d7e80dd5ef5d6c8bc Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Wed, 6 Sep 2017 18:56:52 +0000 Subject: [PATCH] Strip timezone and microsecond for admin guild member list --- webapp/titanembeds/blueprints/admin/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/titanembeds/blueprints/admin/admin.py b/webapp/titanembeds/blueprints/admin/admin.py index e773718..ff28728 100644 --- a/webapp/titanembeds/blueprints/admin/admin.py +++ b/webapp/titanembeds/blueprints/admin/admin.py @@ -78,7 +78,7 @@ def cosmetics_patch(): def prepare_guild_members_list(members, bans): all_users = [] 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: user = { "id": member.id,