From a39ff9d5f9431229ca6b401380539b196ec9c8dd Mon Sep 17 00:00:00 2001 From: Conrad Ho Date: Tue, 14 Apr 2015 03:54:05 +0800 Subject: Ticket299: add time stamp to index.html reports page --- coverage/html.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'coverage/html.py') diff --git a/coverage/html.py b/coverage/html.py index 2a9e0d11..92ca3f1e 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals +import datetime import json import os import re @@ -261,11 +262,14 @@ class HtmlReporter(Reporter): self.totals = sum(f['nums'] for f in self.files) + time_stamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M') + html = index_tmpl.render({ 'arcs': self.arcs, 'extra_css': self.extra_css, 'files': self.files, 'totals': self.totals, + 'time_stamp': time_stamp, }) self.write_html( -- cgit v1.2.1