diff --git a/locust/webui/src/components/LineChart/LineChart.utils.ts b/locust/webui/src/components/LineChart/LineChart.utils.ts index ceaf484aca..f86fb2b73c 100644 --- a/locust/webui/src/components/LineChart/LineChart.utils.ts +++ b/locust/webui/src/components/LineChart/LineChart.utils.ts @@ -56,15 +56,7 @@ const createYAxis = ({ } as YAXisComponentOption; }; -const formatTimeAxis = (value: string) => { - const date = new Date(value); - - return [ - padStart(date.getHours(), 2), - padStart(date.getMinutes(), 2), - padStart(date.getSeconds(), 2), - ].join(':'); -}; +const formatTimeAxis = (value: string) => new Date(value).toLocaleTimeString(); const renderChartTooltipValue = ({ chartValueFormatter,