[ad_1]
Hello,
For now I have changed the line to this to make this work
try {
$endDate[0] = new DateTime( $endDate[0] );
} catch (Exception $e) {
continue;
}
Thanks for this report, although the issue you’re describing seems to indicate the time zone of your WP site is not accessible for some reason. It also shouldn’t be possible to add an invalid date unless you’re doing something custom.
Are you using a front-end form or some other custom means of setting the DateTime field, or modifying your WordPress time zone settings in some other way?
If so, be sure to double check the meta fields and their expected values: https://docs.piecalendar.com/article/8-meta-fields
_piecal_start_date expects a DateTime value like this: 2024-07-25T10:00:00
I have this issue noted for consideration in a future release.
Thanks!