[ZBX-20704] DateTime::__construct(): Failed to parse time string Created: 2022 Mar 03  Updated: 2023 May 23  Resolved: 2022 Mar 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: 6.0.1
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Pavol Vrba Assignee: Edgar Akhmetshin
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 20.04
PHP 7.4.3, Apache 2.4.41
Mariadb 10.3 -> 10.6
Zabbix 5.4 -> 6.0.1


Attachments: PNG File image-2023-05-22-14-35-57-846.png     JPEG File zabbix_6_error.JPG    
Issue Links:
Duplicate
is duplicated by ZBX-20772 Zabbix Frontend 6.0.2 DateTime::__con... Closed

 Description   

After upgrade to Zabbix 6.0.1 and click on https://<zabbix_server>/zabbix.php?action=latest.view we did error:

DateTime::__construct(): Failed to parse time string (@1646319733.1400778) at position 18 (8): Unexpected character



 Comments   
Comment by Edgar Akhmetshin [ 2022 Mar 04 ]

Hello Pavol,

Could you please clean browser cache and also open web inspector/debugger (depends on browser) and show Console and Network tabs?

Also please confirm which encoding used within database for zabbix schema?

Regards,
Edgar

Comment by Pavol Vrba [ 2022 Mar 07 ]

Hello Edgar,

Problem resolved. Error arised after using unixtime unit in zabbix item for value 1646400813.0498946 (node_exporter: node_time_seconds 1.6464008130498946e+09).

This value has more then 16 digits and it’s invalid for converting timestamps to human-readable date . I had to edit preprocessing steps for the zabbix item.

Best regards,

Pavol

 

Comment by Nina Dutra [ 2023 May 22 ]

In my case it happened in the AWS RDS instance by HTTP template with the Create Time item. I had to add another pre-processing step as a regular expression and filter the result just for the number before the dot.

 

Generated at Tue Jun 24 06:32:28 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.