“依赖系统的时区设置是不安全的" [英] "It is not safe to rely on the system's timezone settings"
问题描述
我有一个一周前完成的脚本,没有任何问题或错误.今天,我再次对其进行了测试,并收到了以下消息:
I have a script that I completed a week ago, without any problem or bug. Today, I tested it again and I received these messages:
严格的标准:date() [function.date]:依赖是不安全的系统的时区设置.请使用 date.timezone 设置,TZ 环境变量或 date_default_timezone_set()功能.如果您使用了这些方法中的任何一种并且您仍然收到此警告,您很可能拼错了时区标识符.我们在 '1.0/DST' 中选择了 'Europe/London'C:\Users\xx\VertrigoServ\www\login\PHPMailer\class.phpmailer.php 上1925行
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/London' for '1.0/DST' instead in C:\Users\xx\VertrigoServ\www\login\PHPMailer\class.phpmailer.php on line 1925
严格的标准:date() [function.date]:依赖是不安全的系统的时区设置.请使用 date.timezone 设置,TZ 环境变量或 date_default_timezone_set()功能.如果您使用了这些方法中的任何一种并且您仍然收到此警告,您很可能拼错了时区标识符.我们在 '1.0/DST' 中选择了 'Europe/London'C:\Users\xx\VertrigoServ\www\login\PHPMailer\class.phpmailer.php 上1929行
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/London' for '1.0/DST' instead in C:\Users\xx\VertrigoServ\www\login\PHPMailer\class.phpmailer.php on line 1929
我已经在 php.ini ;date.timezone = "Europe/Lisbon"
中进行了设置,并且发生了同样的情况.我已经重启服务器了
I already set in the php.ini ;date.timezone = "Europe/Lisbon"
and the same occurs. I've already restart the server
有什么想法吗?
推荐答案
在php.ini中,;
注释掉一行,所以;date.timezone = "Europe/Lisbon"
什么都不做.通过删除前面的 ;
取消注释该行,然后重新启动 Apache.
In php.ini, ;
comments out a line, so ;date.timezone = "Europe/Lisbon"
does nothing. Uncomment that line by removing that preceding ;
and restart Apache.
这篇关于“依赖系统的时区设置是不安全的"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!