Report: Data, plots, datetime
[csit.git] / resources / tools / presentation / generator_report.py
index 55ac76b..07103db 100644 (file)
 """Report generation.
 """
 
-import subprocess
 import logging
 import datetime
 
-from os import makedirs, environ
-from os.path import isdir
-from shutil import copy, Error, make_archive
+from shutil import make_archive
 
 from utils import get_files, execute_command, archive_input_data
-from errors import PresentationError
 
 
 # .css file for the html format of the report
@@ -107,7 +103,7 @@ def generate_html_report(release, spec, versions):
 
     cmd = HTML_BUILDER.format(
         release=release,
-        date=datetime.date.today().strftime('%d-%b-%Y'),
+        date=datetime.datetime.utcnow().strftime('%m/%d/%Y %H:%M UTC'),
         working_dir=spec.environment["paths"]["DIR[WORKING,SRC]"],
         build_dir=spec.environment["paths"]["DIR[BUILD,HTML]"])
     execute_command(cmd)
@@ -152,7 +148,7 @@ def generate_pdf_report(release, spec, versions):
     build_dir = spec.environment["paths"]["DIR[BUILD,LATEX]"]
     cmd = PDF_BUILDER.format(
         release=release,
-        date=datetime.date.today().strftime('%d-%b-%Y'),
+        date=datetime.datetime.utcnow().strftime('%m/%d/%Y %H:%M UTC'),
         working_dir=spec.environment["paths"]["DIR[WORKING,SRC]"],
         build_dir=build_dir)
     execute_command(cmd)