From 928b3e61e0c75cc0090c4812524bbfd2f02f27c2 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Thu, 2 Nov 2023 23:24:28 +0100 Subject: [PATCH] fix: fix round issue in git commit list diff calculation Signed-off-by: Stefan Dej --- .../panels/Machine/UpdatePanel/GitCommitsListDayCommit.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/panels/Machine/UpdatePanel/GitCommitsListDayCommit.vue b/src/components/panels/Machine/UpdatePanel/GitCommitsListDayCommit.vue index c29bf675e..68854fbc9 100644 --- a/src/components/panels/Machine/UpdatePanel/GitCommitsListDayCommit.vue +++ b/src/components/panels/Machine/UpdatePanel/GitCommitsListDayCommit.vue @@ -67,7 +67,7 @@ export default class GitCommitsListDayCommit extends Mixins(BaseMixin) { commitDay.setHours(0, 0, 0, 0) const todayDay = new Date() todayDay.setHours(0, 0, 0, 0) - const diff = Math.floor(todayDay.getTime() - commitDay.getTime()) / (1000 * 60 * 60 * 24) + const diff = Math.floor((todayDay.getTime() - commitDay.getTime()) / (1000 * 60 * 60 * 24)) if (diff === 0) { const diffHours = Math.floor((new Date().getTime() - this.commit.date * 1000) / (1000 * 60 * 60))