-6

How can I remove messages examples below from a website? The messages similar to the below appear on every page.

"A PHP ERROR WAS ENCOUNTERED SEVERITY: WARNING MESSAGE: 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 'UTC' FOR 'UTC/0.0/NO DST' INSTEAD FILENAME: COMMON/CONTENT-FOOTER.PHP LINE NUMBER: 81"

Laura
  • 7

2 Answers2

4

Read carefully all that text. Answer is already in it. You need to set your date.timezone in php.ini or in runtime using date_default_timezone_set

Yaroslav
  • 2,338
  • 26
  • 37
3

Per this link, setdate.timezone in your php.ini file:

How to fix warning from date() in PHP"

See also:

http://php.net/manual/en/function.date-default-timezone-set.php

http://www.php.net/manual/en/timezones.php

Finally, here's the PHP manual page for php.ini:

http://php.net/manual/en/datetime.configuration.php

Community
  • 1
  • 1
paulsm4
  • 114,292
  • 17
  • 138
  • 190