Skip to content

Commit

Permalink
formatters: Use format_date() in SummaryFormatter output
Browse files Browse the repository at this point in the history
The heading of the default SummaryFormatter output didn't use the format_date()
wrapper to handle UTC conversions correctly, which meant it output wrong dates
for the test runs. Fix this by correctly using the helper.

Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
  • Loading branch information
tohojo committed Sep 10, 2024
1 parent 06812bf commit 574dcb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flent/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from functools import reduce

from flent import plotters, combiners
from flent.util import classname, format_bytes
from flent.util import classname, format_bytes, format_date
from flent.loggers import get_logger

try:
Expand Down Expand Up @@ -351,8 +351,8 @@ def __init__(self, settings):
def format(self, results):
self.open_output()
for r in results:
self.write("\nSummary of %s test run from %s" % (r.meta('NAME'),
r.meta("TIME")))
self.write(f"\nSummary of {r.meta('NAME')} test run "
f"from {format_date(r.meta('TIME'),'%Y-%m-%d %H:%M:%S')}")
if r.meta('TITLE'):
self.write("\n Title: '%s'" % r.meta('TITLE'))
if self.settings.DATA_CUTOFF:
Expand Down

0 comments on commit 574dcb5

Please sign in to comment.