X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_report.py;h=07103dbb1fd3e524bfb5390309debdfa2da8ffd9;hp=55ac76bd1d1945a8ad79ce543eb10fbe628eaf01;hb=898aeaa4efbbfcffea77471220ffa903600d3b06;hpb=efdcf6470f6e15dcc918c70e5a61d10e10653f1e diff --git a/resources/tools/presentation/generator_report.py b/resources/tools/presentation/generator_report.py index 55ac76bd1d..07103dbb1f 100644 --- a/resources/tools/presentation/generator_report.py +++ b/resources/tools/presentation/generator_report.py @@ -14,16 +14,12 @@ """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)