Module: check_mk
Branch: master
Commit: 7796352c6439c3db3e157007b5a6a80d1708d2f8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7796352c6439c3…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Dec 29 14:48:41 2016 +0100
Fixed 'Relative' display option for very old timestamps.
Change-Id: I146c0cf436a936a47061a4746f230b1a21efc20c
---
web/plugins/views/painters.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index 808a6e2..0fd1852 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -192,7 +192,7 @@ def paint_age(timestamp, has_been_checked, bold_if_younger_than,
mode=None, what
dateformat = painter_options.get("ts_date")
age = time.time() - timestamp
if mode == "abs" or \
- (mode == "mixed" and age >= 48 * 3600 or age < -48 * 3600):
+ (mode == "mixed" and abs(age) >= 48 * 3600):
return "age", time.strftime(dateformat + " %H:%M:%S",
time.localtime(timestamp))
warn_txt = ''