From 80045cdb4e5d909ad954d636b200a4e225e1bc13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Arnauts?= Date: Sat, 28 Nov 2020 17:16:11 +0100 Subject: [PATCH] Fix authentication on some older Android devices (#58) --- resources/lib/viervijfzes/auth_awsidp.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/resources/lib/viervijfzes/auth_awsidp.py b/resources/lib/viervijfzes/auth_awsidp.py index 6917aa5..fc04f14 100644 --- a/resources/lib/viervijfzes/auth_awsidp.py +++ b/resources/lib/viervijfzes/auth_awsidp.py @@ -12,7 +12,6 @@ import hmac import json import logging import os -import sys import requests import six @@ -340,11 +339,7 @@ class AwsIdp: days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] time_now = datetime.datetime.utcnow() - if sys.platform.startswith('win'): - format_string = "{} {} %#d %H:%M:%S UTC %Y".format(days[time_now.weekday()], months[time_now.month]) - else: - format_string = "{} {} %-d %H:%M:%S UTC %Y".format(days[time_now.weekday()], months[time_now.month]) - + format_string = "{} {} {} %H:%M:%S UTC %Y".format(days[time_now.weekday()], months[time_now.month], time_now.day) time_string = datetime.datetime.utcnow().strftime(format_string) return time_string