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 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user