I've been developing a small web application and everything worked great in IDE, but the first time I sent it to the server I got this error:
PHP Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting 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 'America/Chicago' for 'CDT/-5.0/DST' instead' in /home/jhenslee/public_html/simpleWFA/WarframeAlerts.php:49\nStack trace:\n#0 /home/.../public_html/.../....php(49): DateTime->__construct()\n#1 {main}\n thrown in /home/.../public_html/.../....php on line 49
The problem is that I am doing a lot with the time (ex.):
$now = new DateTime();
$rssdate = new DateTime();
$age = new DateInterval("P1D");
$trdate_obj = $rssdate->createFromFormat(DateTime::RSS, $pubdate);
$age = $now->diff($trdate_obj);
$age_minutes = ($age->h * 60) + ($age->i);
$timeleft = ($lengthnum - $age_minutes);
$msg = $age->h . " hours " . $age->i . " minutes";
Do the other functions/ways of getting time still work with everything I have written?
Thanks!