import time,os,datetime
import urllib3
utcNow = datetime.datetime.utcnow()
fifteen = utcNow +datetime.timedelta(minutes=-15)
timestr = fifteen.strftime('%Y-%m-%dT%H:%M:%S.%f.Z')
query = '{"_lastInform:":{"$gt":"%s"}}'% timestr
print(query)
import urllib
query = urllib.parse.quote(query)
# datetime.timedelta(minutes=15)
result = urllib.parse.unquote(query)
print(result)