- Plesk for Linux
A website is showing PHP warnings as below:
PLESK_INFO: Message: 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 'Europe/Berlin' for 'CEST/2.0/DST' instead
The parameter 'ini_set' is defined inside the website code:
# grep -ir ini_set /var/www/vhosts/example.com/httpdocs | grep display_errors
/var/www/vhosts/example.com/httpdocs/index.php: @ini_set('display_errors', 1);
PHP 5.3 requires that either a timezone set in a php.ini file or that the desired timezone is passed via the date_default_timezone_set() function before calling the date() function.
In Plesk go to Domains > example.com > PHP Settings.
Specify the directive date.timezone in the Additional configuration directives field. The list of supported time-zones is available here.
Apply the changes.