When you get this error the only thing you need to do is add a line similar to this one to your php.ini file:

date.timezone = "America/Mexico_City"

You can get a list of the supported timezones on this URL: http://php.net/manual/en/timezones.php. The error should go away after you restart apache.

For Linux systems there are some times two php.ini files, one for apache and one for CLI. Make sure you add the line to both files.

[ apache  error_messages  linux  php  ]
Socket Statistics with ss
Making your local server accessible from anywhere
Setting environment variables
sudo: unable to resolve host
Local Apache and OpenSSL configuration