• Resolved SJW

    (@whitsey)


    I have a site in testing that keeps showing this error. It only appears intermittently and it goes away if I refresh the page BUT, we want to go live and need to be sure this wont happen in production.

    The full error that appears across the top of the page:

    Warning: strtotime() [function.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 ‘Antarctica/Macquarie’ for ‘EST/10.0/no DST’ instead in /wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 1691

    This looks like a date setting BUT the date is set by WordPress so I’ve never experienced this on other sites before?

    NOTE: IT appears in the source before anything else:

    <br />
    <b>Warning</b>: strtotime() [function.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 ‘Antarctica/Macquarie’ for ‘EST/10.0/no DST’ instead in <b>/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php</b> on line <b>1691</b><br />
    <!doctype html>
    <html class=”no-js lt-ie9″ lang=”en-AU” prefix=”og: https://ogp.me/ns#”&gt;

    • This topic was modified 7 years, 4 months ago by SJW.
Viewing 1 replies (of 1 total)
  • Hi Shannon,
    This issue happens when a default TimeZone isn’t set in php.ini file and the firewall protection level is “Extended Protection”, so if you are using mod_php, adding this line in “.htaccess” file should fix this issue:
    php_value date.timezone 'Region/Zone' here is a list of the valid timezones in PHP: https://php.net/manual/en/timezones.php

    Or you can add date.timezone 'Region/Zone' directly in php.ini/.user.ini file, depending on your server configuration.

    With that said, we have a ticket opened on our system (reference number: #1415) that should address this issue in one of the upcoming releases, unfortunately, I don’t have an ETA yet.

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’ is closed to new replies.