-
Problem report
-
Resolution: Fixed
-
Trivial
-
6.0.5rc1, 6.2.0beta3
-
Sprint 90 (Jul 2022)
-
0.25
Problem description: the following runtime error is observed when a user previews or opens is view mode (in Monitoring => Hosts => Graphs ) a graph that has some specific item (for example the Host local time item) with "Y axis MAX value" set to Calculated and that doesn't have any values to show yet:
Exception: DateTime::__construct(): Failed to parse time string (@0.2) at position 3 (2): Unexpected character in /home/sergejs/workspace/6.0/ui/include/func.inc.php:205 Stack trace: #0 /home/sergejs/workspace/6.0/ui/include/func.inc.php(205): DateTime->__construct() #1 /home/sergejs/workspace/6.0/ui/include/func.inc.php(689): zbx_date2str() #2 /home/sergejs/workspace/6.0/ui/include/func.inc.php(631): convertUnitsRaw() #3 /home/sergejs/workspace/6.0/ui/include/graphs.inc.php(965): convertUnits() #4 /home/sergejs/workspace/6.0/ui/include/classes/graphdraw/CLineGraphDraw.php(1172): calculateGraphScaleValues() #5 /home/sergejs/workspace/6.0/ui/include/classes/graphdraw/CLineGraphDraw.php(2093): CLineGraphDraw->drawVerticalScale() #6 /home/sergejs/workspace/6.0/ui/chart3.php(194): CLineGraphDraw->draw() #7 {main}
Steps to reproduce:
- Make sure Zabbix server isn't running
- Create a host with the Host local time item
- Navigate to Graphs section for this host and press "Create graph" button
- In the opened form select the Host local time item and set "Y axis MAX value" set to "Calculated".
- Switch to the "Preview" tab
Result: the above runtime error is observed, the graph is not loaded. This runtime error is also observed when opening the graph in Monitoring => Hosts => Graphs view
Expected: no runtime errors should be observed, empty graph should be displayed
- caused by
-
ZBXNEXT-6999 Advanced SLA reporting
- Closed
- duplicates
-
ZBX-21184 Failed to parse time string error when graph item is unixtime and no data
- Closed
- is duplicated by
-
ZBX-20772 Zabbix Frontend 6.0.2 DateTime::__construct(): Failed to parse time string
- Closed