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:

1
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 apache linux
Making your local server accessible from anywhere linux apache
Setting environment variables apache php
sudo: unable to resolve host apache linux
Local Apache and OpenSSL configuration apache linux