diff --git a/locust/templates/report.html b/locust/templates/report.html index 98949431fd..69524007ce 100644 --- a/locust/templates/report.html +++ b/locust/templates/report.html @@ -44,7 +44,7 @@

Locust Test Report

{% if show_download_link %}

Download the Report

{% endif %} -

During: {{ start_time }} - {{ end_time }}

+

During: {{ start_time }} - {{ end_time }}

Target Host: {{ host }}

@@ -219,6 +219,20 @@

Charts

] }); } + + $(".l10n.datetime").html((index, currentContent) => { + if (!currentContent || !currentContent.includes(" ") || !currentContent.includes(":")) { + return currentContent; + } + + let [date, time] = currentContent.split(" "); + let utcDateTime = new Date(); + let [year, month, day] = date.split("-") + utcDateTime.setUTCFullYear(year, parseInt(month) - 1, day); + utcDateTime.setUTCHours(...(time.split(":"))); + + return utcDateTime.toLocaleString(); + });