• Resolved Akshay Jain

    (@akshayjain)


    While working I noticed my meta key has string stored for some products and date for other. It is throwing following error in this case

    [25-Jul-2024 14:51:18 UTC] PHP Fatal error: Uncaught Exception: Failed to parse time string (Consulting) at position 0 (C): The timezone could not be found in the database in {path to site}/plugins/pie-calendar/includes/shortcode.php:63

    Need to add error handling in this case

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Akshay Jain

    (@akshayjain)

    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;
    }

    Plugin Author Jonathan Jernigan

    (@apexws)

    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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.