I am getting warning about timezone settings on my blog page

Am displaying PHP Date Picker on my blog page using shortcode. But getting below warning.


Warning: date() [function.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 'Australia/Perth' for 'WST/8.0/no DST' instead in /home/xxx/public_html/wp-content/plugins/xxx/calendar/calendar_form.php on line 48

Read More

My server PHP Version is: 5.3.19

How do i get rid of this warning?

I tried to hide PHP warning but not success, still getting warning on it.

error_reporting(E_ALL^ (E_WARNING | E_NOTICE));

Also i tried to set timezone as:

date_default_timezone_set('Australia/Perth');

but no luck.

Now need your help guys. Thanks…

Related posts

Leave a Reply

1 comment

  1. try this:

     date_default_timezone_set("Australia/Perth");
    

    or

    date.timezone = Australia/Perth
    

    use date_default_timezone_get(); instead of date();