Fix authentication on some older Android devices (#58)
This commit is contained in:
parent
57b2ac36c0
commit
80045cdb4e
@ -12,7 +12,6 @@ import hmac
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import six
|
import six
|
||||||
@ -340,11 +339,7 @@ class AwsIdp:
|
|||||||
days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
||||||
|
|
||||||
time_now = datetime.datetime.utcnow()
|
time_now = datetime.datetime.utcnow()
|
||||||
if sys.platform.startswith('win'):
|
format_string = "{} {} {} %H:%M:%S UTC %Y".format(days[time_now.weekday()], months[time_now.month], time_now.day)
|
||||||
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])
|
|
||||||
|
|
||||||
time_string = datetime.datetime.utcnow().strftime(format_string)
|
time_string = datetime.datetime.utcnow().strftime(format_string)
|
||||||
return time_string
|
return time_string
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user