This PHP error indicates that a time string indicating a date and time couldn't be parsed. A common reason for this in OP5 Monitor is that the date_format
setting in naemon.cfg has been changed.
How it should look
The default value of the date_format
setting in naemon.cfg is:
date_format=iso8601
We strongly recommend that you keep this default setting.
What may cause problems
If you set this value to another one of the listed options, for example "euro", your timestamps will now look like this: 23/07/2019 16:00:00
. Since there aren't 23 months in a year, we can tell that this means DD/MM/YYYY
, right?
The problem is when you pass a string like this to PHP, it may interpret this as an "American" MM/DD/YYYY
type string, which doesn't make any sense -- and you get an error:
modules/reports/controllers/base_reports.php [281]: DateTime::__construct(): Failed to parse time string (23/07/2019 16:00:00) at position 0 (2): Unexpected character
Summary
Do not change the date_format
setting in naemon.cfg
unless you have very good reason to do so, and know that it may break reports.
Comments
0 comments
Please sign in to leave a comment.