Title: Fatal error DateTime
Last modified: July 3, 2024

---

# Fatal error DateTime

 *  Resolved [Flowster Hungary](https://wordpress.org/support/users/flowster/)
 * (@flowster)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/fatal-error-datetime/)
 * Hi,
   We get this message on the events page:
 * Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time
   string (2024-07-04 11:i A) at position 11 (1): Unexpected character in /web/test/
   test.hu/wp-content/plugins/eventprime-event-calendar-management/includes/class-
   eventprime-functions.php:1697 Stack trace: #0 /web/test/test.hu/wp-content/plugins/
   eventprime-event-calendar-management/includes/class-eventprime-functions.php(
   1697): DateTime->__construct(‘2024-07-04 11:i…’) #1 /web/test/test.hu/wp-content/
   plugins/eventprime-event-calendar-management/includes/class-eventprime-functions.
   php(5009): Eventprime_Basic_Functions->ep_get_event_date_time_diff(Object(stdClass))#
   2 /web/test/test.hu/wp-content/plugins/eventprime-event-calendar-management/includes/
   class-eventprime-functions.php(4480): Eventprime_Basic_Functions->get_multiple_events_post_data(
   Array) #3 /web/test/test.hu/wp-content/plugins/eventprime-event-calendar-management/
   public/partials/events/list.php(10): Eventprime_Basic in /web/test/test.hu/wp-
   content/plugins/eventprime-event-calendar-management/includes/class-eventprime-
   functions.php on line 1697
    -  This topic was modified 1 year, 11 months ago by [Flowster Hungary](https://wordpress.org/support/users/flowster/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [eventprimesupport](https://wordpress.org/support/users/eventprimesupport/)
 * (@eventprimesupport)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/fatal-error-datetime/#post-17867927)
 * Thanks for reporting this issue
 * We are looking into it and will get back to you with an update soon.
 *  [eventprimesupport](https://wordpress.org/support/users/eventprimesupport/)
 * (@eventprimesupport)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/fatal-error-datetime/#post-17870743)
 * Thank you for reaching out. To resolve the issue, please follow these steps:
    1. Navigate to your WordPress dashboard.
    2. Go to “Events” -> “Settings”.
    3. Click on the “General” tab.
    4. Select the “Setup” subtab.
    5. Locate the “User Input Date Format” option and select your preferred date format.
 * If the issue persists please let us know. We are here to help!
 *  [jacksondimedaughter](https://wordpress.org/support/users/jacksondimedaughter/)
 * (@jacksondimedaughter)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/fatal-error-datetime/#post-18031226)
 * Not sure why this was marked as resolved, since EventPrime’s “solution” won’t
   fix anything. The problem, if they’d bothered to look at the logs provided by
   the original reporter, is the time picker format they’ve specified in the admin
   scripts isn’t recognised by the [timepicker jQuery plugin](https://trentrichardson.com/examples/timepicker/#tp-formatting)
   they’re using. It’s saving the time as “{hour}:i A” which then can’t be parsed
   by the DateTime constructor (and they’ve done no validation/error handling on
   the date parsing, which is just reckless).
 * If you want to fix it yourself you need to edit {plugin path}/admin/js/em-admin-
   metabox-custom.js and replace all instances of “h:i A” with “h:mm TT”
 *  [klatschianer](https://wordpress.org/support/users/klatschianer/)
 * (@klatschianer)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/fatal-error-datetime/#post-18055723)
 * I have this problem too. The troubleshooting from jacksondimedaughter works.
   
   But this should also be fixed in the plugin. You can’t edit the file after every
   update.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Fatal error DateTime’ is closed to new replies.

 * ![](https://ps.w.org/eventprime-event-calendar-management/assets/icon-256x256.
   gif?rev=2961582)
 * [EventPrime – Events Calendar, Bookings and Tickets](https://wordpress.org/plugins/eventprime-event-calendar-management/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/eventprime-event-calendar-management/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/eventprime-event-calendar-management/)
 * [Active Topics](https://wordpress.org/support/plugin/eventprime-event-calendar-management/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/eventprime-event-calendar-management/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/eventprime-event-calendar-management/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [klatschianer](https://wordpress.org/support/users/klatschianer/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/fatal-error-datetime/#post-18055723)
 * Status: resolved