Title: Fatal Error: Undefined Method DateTime
Last modified: January 18, 2017

---

# Fatal Error: Undefined Method DateTime

 *  Resolved [jdegraaf](https://wordpress.org/support/users/jdegraaf/)
 * (@jdegraaf)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-undefined-method-datetime-2/)
 * Whenever I try to add an event to my site, I get this:
 * Fatal error: Call to undefined method DateTime::createFromFormat()in …/wp-content/
   plugins/the-holiday-calendar/posts/post-manager.class.php on line 44
 * Is there something I’m doing wrong?

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

 *  Plugin Author [mva7](https://wordpress.org/support/users/mva7/)
 * (@mva7)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-undefined-method-datetime-2/#post-8669526)
 * Hi,
 * DateTime::createFromFormat() was introduced in PHP 5.3. And most likely you have
   an older version.
 * Regards,
 * Mva7
    -  This reply was modified 9 years, 4 months ago by [mva7](https://wordpress.org/support/users/mva7/).
 *  Thread Starter [jdegraaf](https://wordpress.org/support/users/jdegraaf/)
 * (@jdegraaf)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-undefined-method-datetime-2/#post-8669534)
 * Ah; that would be it. I _have_ been a bit lax in updating my PHP. Thanks for 
   the speedy response!
    -  This reply was modified 9 years, 4 months ago by [jdegraaf](https://wordpress.org/support/users/jdegraaf/).

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

The topic ‘Fatal Error: Undefined Method DateTime’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/the-holiday-calendar_fefeff.svg)
 * [The Holiday Calendar](https://wordpress.org/plugins/the-holiday-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-holiday-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-holiday-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-holiday-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-holiday-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-holiday-calendar/reviews/)

## Tags

 * [datetime](https://wordpress.org/support/topic-tag/datetime/)
 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * 2 replies
 * 2 participants
 * Last reply from: [jdegraaf](https://wordpress.org/support/users/jdegraaf/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-undefined-method-datetime-2/#post-8669534)
 * Status: resolved