Fix lastchange time in Problems list, closes #1596

This commit is contained in:
Alexander Zobnin
2023-03-23 12:59:49 +01:00
parent 23e9576c7d
commit 713678a32e

View File

@@ -16,7 +16,7 @@ export function isNewProblem(problem: ProblemDTO, highlightNewerThan: string): b
const DEFAULT_TIME_FORMAT = 'DD MMM YYYY HH:mm:ss';
export function formatLastChange(lastchangeUnix: number, customFormat?: string) {
const date = new Date(lastchangeUnix);
const date = new Date(lastchangeUnix * 1000);
const timestamp = dateMath.parse(date);
const format = customFormat || DEFAULT_TIME_FORMAT;
const lastchange = timestamp!.format(format);