Roundcube warning in logs: It is not safe to rely on the system’s timezone settings

Symptoms

Roundcube log shows the following error in /usr/share/psa-roundcube/logs/errors :

PHP Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): 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 'Asia/Singapore' for 'SGT/8.0/no DST' instead' in /usr/share/psa-roundcube/program/include/main.inc:1603

Also, Roundcube may show a blank page if the password was not entered correctly.

Cause

Timezone is not properly set on the server.

Resolution

Set timezone in Roundcube php.ini file like below:

# cat /etc/psa-webmail/roundcube/php.ini | grep date

date.timezone =Asia/Singapore

Fuente support.plesk.com