<分区>
我有这个代码:
try{
$datetime1 = new DateTime("now");
$datetime2 = new DateTime("now");
$interval = $datetime1->diff($datetime2);
var_dump($interval);
}
catch(Exception $e) {
echo $e->getMessage();
}
我没有看到关于 var_dump
的任何结果,php 的输出是:
DateTime::__construct(): It is not safe to rely on the system's timezone setting
s. You are *required* to use the date.timezone setting or the date_default_timez
one_set() function. In case you used any of those methods and you are still gett
ing this warning, you most likely misspelled the timezone identifier. We selecte
d 'Europe/Paris' for '1.0/no DST' instead
我正在使用 php_cli 5.3.8
我能做什么? 谢谢