Mautic Community Forums

Failed to Parse time string - but works if we delete the seconds

We have run into the following issue:

When selecting a future date for a campaign action the system errors out with the message “This value is not valid.” The log is pasted below. If we delete the seconds off of the suggested data (from 2018-05-17 10:55:29 to 2018-05-17 10:55) then the system lets us save the selected date.

I believe this is a server level issue that I just cant figure out. We migrated 4 sites off of one Ubunto 16.04 server running php7 and onto a new one with the same specs. All of the installs on the older server let us save the date without deleting the seconds.

Any help or advice would be greatly appreciated.

[2018-05-22 09:40:58] mautic.CRITICAL: Uncaught PHP Exception Exception: “DateTime::__construct(): Failed to parse time string (05-26-2018 11:00:25) at position 0 (0): Unexpected character” at /var/www/marbrisareferrals/app/bundles/CoreBundle/Helper/DateTimeHelper.php line 89 {“exception”:"[object] (Exception(code: 0): DateTime::__construct(): Failed to parse time string (05-26-2018 11:00:25) at position 0 (0): Unexpected character at /var/www/marbrisareferrals/app/bundles/CoreBundle/Helper/DateTimeHelper.php:89)"} []

Thanks for the tip. Was hoping it was the solutions, but the two files are the same.

I thought I had compared the settings. Turns out there were a few libraries and extensions that had not been installed on the new server. Installed php7.0-intl
and the DateTime error went away. Not sure why it worked, but it did.

Thanks for the guidance