Bug 1391532 - Preserve the precision of a timestamp when converting it to string. r=bkelly

This commit is contained in:
Ho-Pang Hsu 2017-08-30 19:16:02 +08:00
Родитель 61bd1ae7d9
Коммит 8dfeaddc82
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -6,7 +6,7 @@ def main(request, response):
('Last-Modified', time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime()))] ('Last-Modified', time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime()))]
body = ''' body = '''
const importTime = {time}; const importTime = {time:8f};
'''.format(time=time.time()) '''.format(time=time.time())
return headers, body return headers, body

Просмотреть файл

@ -9,7 +9,7 @@ def main(request, response):
test = request.GET['test'] test = request.GET['test']
body = ''' body = '''
const mainTime = {time}; const mainTime = {time:8f};
const testName = {test}; const testName = {test};
importScripts('update-max-aged-worker-imported-script.py'); importScripts('update-max-aged-worker-imported-script.py');