From 3a651c99a11bf9f495b02d5745d0a2859bfc9b1c Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Wed, 8 Nov 2023 20:45:50 +0100 Subject: [PATCH] fix: fix round issue in git commit list diff calculation (#1637) --- .../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))