Author Topic: PHP warning E_STRICT date_default_timezone_get()  (Read 7090 times)

0 Members and 1 Guest are viewing this topic.

aleles

  • Jr. Member
  • **
  • Posts: 2
PHP warning E_STRICT date_default_timezone_get()
« on: March 07, 2012, 09:40:39 PM »
PHP Console is showing this warning

date_default_timezone_get() [<a href='function.date-default-timezone-get'>function.date-default-timezone-get</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'America/New_York' for 'EST/-5.0/no DST' instead

complaining about the below line inside IF in common.php

if (function_exists("date_default_timezone_set")) {
   // TODO try to get timezone from config.php/session etc.
   // autodetect timezone
   @date_default_timezone_set(function_exists("date_default_timezone_get") ? @date_default_timezone_get() : "GMT");
}