-
Incident report
-
Resolution: Fixed
-
Major
-
None
-
1.8.1
I have an item that return the diff in seconds between 2 times, the diff can either be positive or negative so the Item type is "Float" as "Unsigned Integer" won't work for the negative times. The value is properly obtained and stored in the PGSQL database (select from history showed the positive and negative values),
but if I set the unit to "s" (seconds), then the value displayed in the "latest data" screen and "graph" are shown as positive all the time (even if the value is negative).
removing the unit fixes the problem (but then I loose the nice time formatting in hour/minute/seconds).
I believe the problem is in the zbx_date2age() function in include/func.inc.php:
$time = abs($end_date-$start_date);
- is duplicated by
-
ZBX-3691 Wrong value displayed in latest data
- Closed