Skip to content

Commit 8ee2ffb

Browse files
authored
Merge pull request #2405 from Kobzol/time-format-round
Truncate seconds when formatting time in the frontend
2 parents 9c90810 + a0293a1 commit 8ee2ffb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

site/frontend/src/utils/formatting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {PREF_DATETIME_FORMAT} from "../pages/compare/prefs";
44

55
// `time` has to be in seconds
66
export function formatSecondsAsDuration(time: number): string {
7-
let seconds = time % 60;
7+
let seconds = Math.trunc(time % 60);
88
let mins = Math.trunc(time / 60);
99
let hours = Math.trunc(mins / 60);
1010
mins -= hours * 60;

0 commit comments

Comments
 (0)