Skip to content

Commit 9bfae12

Browse files
committed
Hotfix trying to fix timer shows 1 hour instead of 1 min
1 parent c52dddc commit 9bfae12

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Servers/UI/OJS.Servers.Ui/ClientApp/src/pages/contests/contest-solution-submit/ContestSolutionSubmitPage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,7 @@ const ContestSolutionSubmitPage = () => {
288288
}
289289

290290
const intervalId = setInterval(() => {
291-
const currentTime = moment();
292-
const elapsedTimeInSeconds = moment.utc(currentTime).diff(moment.utc(lastSubmissionTime), 'seconds');
291+
const elapsedTimeInSeconds = moment.utc().diff(moment.utc(lastSubmissionTime), 'seconds');
293292
const newRemainingTime = userSubmissionsTimeLimit - elapsedTimeInSeconds;
294293

295294
if (newRemainingTime <= 0) {

0 commit comments

Comments
 (0)