PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

How to fix error Warning: date(): It is not safe to rely on the system's timezone...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to fix error Warning: date(): It is not safe to rely on the system's timezone...

    I am getting this error message on the search page:

    Warning: date(): 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 /home/merilyns/public_html/search.php on line 3414

    You can see the search page here - http://merilynsimonds.com/bio-test.html.

    I am still testing, so the page might move around a bit, but the idea will be to have a search box at the end of the menu.

    I just download the program today, so it is the latest version. I am using Windows 7 and viewing the website in Firefox. There is a 'scroll-to-the-top' javascript installed on the site which references jquery.min.js, but it doesn't make sense that that would be the problem with this.

    How do I fix it?

    Other than this little hiccup, this is a great little addon for an HTML website! Thanks.

  • #2
    This is most likely due to an incorrect setup on your server. There should be a timezone set in your php.ini file.

    There should be something like this in the php.ini file,
    date.timezone = America/New_York
    Otherwise you can also edit the .htaccess file.
    php_value date.timezone "America/Sao_Paulo" Obviously the actual time zone that you use will depend on where you are. If none of this makes sense, you might have to open a ticket with your hosting company to get the timezone correctly configured in PHP.

    Comment


    • #3
      you mean we have to set the timezone according to America/New_York?? not any other country??

      Comment


      • #4
        you mean we have to set the timezone according to America/New_York??
        No, this is not what I mean.

        I mean you need to set a valid timezone (As opposed to having nothing set).
        Obviously the actual time zone that you use will depend on where you are.
        The country doesn't matter.

        Comment


        • #5
          Originally posted by wrensoft View Post

          No, this is not what I mean.

          I mean you need to set a valid timezone (As opposed to having nothing set).
          Obviously the actual time zone that you use will depend on where you are.
          The country doesn't matter.
          ok. thanks.. I knew it but thanks for conformation

          Comment

          Working...
          X