From 93365addd1f684400a925058a23206cec7c38ec6 Mon Sep 17 00:00:00 2001 From: ATM-Nicolas Date: Mon, 15 Apr 2019 11:38:49 +0200 Subject: [PATCH] FIX : Total per day shows 00:00 if the total time spent is equal to 12:00 --- htdocs/core/js/timesheet.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/htdocs/core/js/timesheet.js b/htdocs/core/js/timesheet.js index aaec6971e2f..4eae63154d4 100644 --- a/htdocs/core/js/timesheet.js +++ b/htdocs/core/js/timesheet.js @@ -91,17 +91,11 @@ function parseTime(timeStr, dt) dt = new Date(); } - var time = timeStr.match(/(\d+)(?::(\d\d))?\s*(p?)/i); + var time = timeStr.match(/(\d+)(?::(\d\d))?/i); if (!time) { return -1; } var hours = parseInt(time[1], 10); - if (hours == 12 && !time[3]) { - hours = 0; - } - else { - hours += (hours < 12 && time[3]) ? 12 : 0; - } dt.setHours(hours); dt.setMinutes(parseInt(time[2], 10) || 0);