From 0598930b09ee863018709845880b51b8fd8b8d55 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Sun, 9 Mar 2014 22:27:36 +0100 Subject: [PATCH] Fix minus null minutes again. --- public/js/icinga/ui.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/js/icinga/ui.js b/public/js/icinga/ui.js index 08911c696..8056a0d4f 100644 --- a/public/js/icinga/ui.js +++ b/public/js/icinga/ui.js @@ -277,10 +277,13 @@ } else if (nm == 0 && ns == 0) { signed = '-'; sec = 1; - } else if (nm == 0) { + } else if (nm == 0 && m[1][0] == '-') { signed = '-'; sec = ns; sec++; + } else if (nm == 0 && m[1][0] != '-') { + sec = ns; + sec--; } else { signed = ''; sec = nm * 60 + ns;