I have this code:
try{
$datetime1 = new DateTime("now");
$datetime2 = new DateTime("now");
$interval = $datetime1->diff($datetime2);
var_dump($interval);
}
catch(Exception $e) {
echo $e->getMessage();
}
I do not see any result regarding the var_dump
, the output of php is:
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
I'm using php_cli 5.3.8
What can I do? Thanks