You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I presume you are using the demo content right? As you can see the date error is coming from the file blog_post.md file. I could recreate the error. At the time the demo content, Grav only supported a limited number of formats like m-d-Y. Now it can use any formats.
You have two possibilities now. Either you change the date in the above file to, e.g., date: '2014-06-23' or you can add the default format pages.dateformat.default: 'm-d-Y' into your system.yaml.
Sommerregen
For myself I add some code to recreate the problem in pure PHP.
// The "right" way defining default datetimes$datetime = newDateTime('2014-06-23');
// A Hack using pages.dateformat.default: 'm-d-Y'`$datetime = DateTime::createFromFormat('m-d-Y', '06-23-2014');
Getting this error when attempting to use grav-theme-machine on fresh grav install.
"DateTime::__construct(): Failed to parse time string (06-23-2014) at position 0 (0): Unexpected character"
Highlights line 581 of system/src/Grav/Common/Utils.php
I'm running under MAMP on macOS.
The text was updated successfully, but these errors were encountered: