"It is unsafe to rely on the system time zone settings"

I have a script that I completed a week ago, without any problems or errors. Today I checked it again and I received these messages:

Strict standards: date () [function.date]: it is unsafe to rely on the system time zone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set () function. If you used any of these methods, and you still received this warning, you most likely sealed the time zone identifier. We selected "Europe / London" for "1.0 / DST" instead of C: \ Users \ xx \ VertrigoServ \ www \ login \ PHPMailer \ class.phpmailer.php on line 1925

Strict standards: date () [function.date]: it is unsafe to rely on the system time zone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set () function. If you used any of these methods, and you still received this warning, you most likely sealed the time zone identifier. We chose "Europe / London" for "1.0 / DST" instead of C: \ Users \ xx \ VertrigoServ \ www \ login \ PHPMailer \ class.phpmailer.php on line 1929

I am already installed in php.ini ;date.timezone = "Europe/Lisbon" and this is happening. I have already rebooted the server

Any ideas?

+7
source share
2 answers

In php.ini ; comments on the line, therefore ;date.timezone = "Europe/Lisbon" does nothing. Uncomment this line by deleting the previous one ; and restart Apache.

+12
source

Why not do the following :?

 date_default_timezone_set('Europe/Lisbon'); 
+2
source

All Articles