Title: PHP Warning: strtotime()
Last modified: October 17, 2017

---

# PHP Warning: strtotime()

 *  Resolved [Sonika](https://wordpress.org/support/users/sonika/)
 * (@sonika)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/php-warning-strtotime-2/)
 * I got in logs:
 * [Tue Oct 17 11:35:25.558310 2017] [cgi:error] [pid 19725] [client **_MY IP_**:
   40050] AH01215: PHP Warning: strtotime(): It is not safe to rely on the system’s
   timezone settings. You are *required* to use the date.timezone setting or the
   date_default_timezone_set() function. In case you used any of those methods and
   you are still getting this warning, you most likely misspelled the timezone identifier.
   We selected the timezone ‘UTC’ for now, but please set date.timezone to select
   your timezone. in **_path_/wp-content/cache/autoptimize/autoptimize_3984b828caccee7d2e7beda036c58f26.
   php** on line 51
 * autoptimize_3984b828caccee7d2e7beda036c58f26.php line 51:
    `$modTimeMatch = (
   isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE'])
   === $modTime);`
 * What is it?
    -  This topic was modified 8 years, 7 months ago by [Sonika](https://wordpress.org/support/users/sonika/).
    -  This topic was modified 8 years, 7 months ago by [Sonika](https://wordpress.org/support/users/sonika/).

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/php-warning-strtotime-2/#post-9594518)
 * It’s just a warning, AO’s functionality is not impacted, but it’s always better
   not to have warnings, so;
 * Can you open [plugins/autoptimize/config/delayed.php and on line 49](https://github.com/futtta/autoptimize/blob/master/config/delayed.php#L49)(
   an empty line) add
 * `date_default_timezone_set("UTC");`
 * After you’ve done that clear your Autoptimize and Page Cache plugin’s cache and
   check if the warning still appears. If this works I’ll add it to the development
   version.
 * hope this helps,
    frank
 *  Thread Starter [Sonika](https://wordpress.org/support/users/sonika/)
 * (@sonika)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/php-warning-strtotime-2/#post-9595015)
 * [@optimizingmatters](https://wordpress.org/support/users/optimizingmatters/)
   
   Thx for answer! I did it. I will wait 12 hours and will see the logs again, and
   will write the result here!
 *  Thread Starter [Sonika](https://wordpress.org/support/users/sonika/)
 * (@sonika)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/php-warning-strtotime-2/#post-9597542)
 * I dont see this warning. thx for help!
    -  This reply was modified 8 years, 7 months ago by [Sonika](https://wordpress.org/support/users/sonika/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/php-warning-strtotime-2/#post-9597600)
 * great! 🙂
 * [fix added to the development-version](https://github.com/futtta/autoptimize/commit/f38408e64454be0ae7b26412986d4a93d8679f81),
   thanks for your help!
 * frank

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

The topic ‘PHP Warning: strtotime()’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/php-warning-strtotime-2/#post-9597600)
 * Status: resolved