---
title: "How to fix Report generation fails: \"There was an error rendering the page\", Failed to parse time string (...) at position 0 (2): Unexpected character"
description: "Report generation fails with a time string parsing error when the dateformat setting in naemon.cfg is changed. Keeping the default dateformat setting prevents this PHP error and ensures proper report rendering in OP5 Monitor."
url: "https://docs.itrsgroup.com/docs/faq/op5/360033083054-op5-monitor-how-to-fix-report-generation-fails-there-was-an-error-rendering-the-page-failed-to-parse-time-string-at-position-0-2-unexpected-character/index.html"
---
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.


