From 4ade07c9a44c1903ccf0294e070127f3debd28bc Mon Sep 17 00:00:00 2001 From: Mathias Date: Mon, 9 Nov 2020 13:27:45 +0100 Subject: [PATCH] bug fix --- src/Frontend/utils.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Frontend/utils.jsx b/src/Frontend/utils.jsx index 4688a51..1307157 100644 --- a/src/Frontend/utils.jsx +++ b/src/Frontend/utils.jsx @@ -104,7 +104,10 @@ const calculateEndTime = (startTime, minUsed) => { if (min < 10){ min = "0" + min } - const final_hours = parseInt(hours_min[0]) + hours; + let final_hours = (parseInt(hours_min[0]) + hours) % 24; + if (final_hours < 10 ) { + final_hours = "0" + final_hours; + } const final = final_hours + ":" + min; return final;