Title: php 5.3.x DateTime::createFromFormat()
Last modified: August 21, 2016

---

# php 5.3.x DateTime::createFromFormat()

 *  Resolved [aryanduntley](https://wordpress.org/support/users/dunar21/)
 * (@dunar21)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-53x-datetimecreatefromformat/)
 * This call in lib/class-wp-json-posts.php (and probably elsewhere) does not seem
   to always work with php versions < 5.4 (despite the php docs). Yes people can
   probably use latest versions with their shared hosting if they know how or know
   how/where to look, but for those who do not will probably get pretty frustrated.
   Hostgator’s default is 5.3. You can use 5.4 by adding:
    AddType application/x-
   httpd-php54 .php to your .htaccess file in the root of your file structure.
 * It would be good if you either chose another method to use for this or checked
   if the mehod is available and if not, then use a different one for compatability
   issues that may occur.
 * [http://wordpress.org/plugins/json-rest-api/](http://wordpress.org/plugins/json-rest-api/)

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

 *  Plugin Author [Ryan McCue](https://wordpress.org/support/users/rmccue/)
 * (@rmccue)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-53x-datetimecreatefromformat/#post-4373848)
 * Filed as [issue #52](https://github.com/WP-API/WP-API/issues/52). Thanks!
 *  Plugin Author [Ryan McCue](https://wordpress.org/support/users/rmccue/)
 * (@rmccue)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/php-53x-datetimecreatefromformat/#post-4373912)
 * This has now been fixed and will be included in the next release, marking as 
   resolved.
 *  Thread Starter [aryanduntley](https://wordpress.org/support/users/dunar21/)
 * (@dunar21)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/php-53x-datetimecreatefromformat/#post-4373913)
 * Thanks

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

The topic ‘php 5.3.x DateTime::createFromFormat()’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/json-rest-api_2e3641.svg)
 * [WP REST API (WP API)](https://wordpress.org/plugins/json-rest-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-rest-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-rest-api/)
 * [Active Topics](https://wordpress.org/support/plugin/json-rest-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-rest-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-rest-api/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [aryanduntley](https://wordpress.org/support/users/dunar21/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/php-53x-datetimecreatefromformat/#post-4373913)
 * Status: resolved