I recently had a site hacked. After getting it back up and running I started to receive this message when testing the “Contact” page. This is an older site which was built for me and I know nothing about .php but am able to open the below referenced pages and can add/change code if anyone can make suggestions. First is the warning message and below that is the code on the lines (+) refereed to in those warnings. Sorry, not able to post a link due to forum rules.
Thanks for any help!
Warning: date() [function.date]: 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/Los_Angeles’ for ‘PDT/-7.0/DST’ instead in /home/westli6/public_html/class.phpmailer.php on line 1925
Warning: date() [function.date]: 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/Los_Angeles’ for ‘PDT/-7.0/DST’ instead in /home/westli6/public_html/class.phpmailer.php on line 1929 Could not instantiate mail function.
////////////////////////////////////
public static function RFCDate() {
$tz = date(‘Z’);
$tzs = ($tz < 0) ? ‘-’ : ‘+’;
$tz = abs($tz);
$tz = (int)($tz/3600)*100 + ($tz%3600)/60;
$result = sprintf("%s %s%04d", date(‘D, j M Y H:i:s’), $tzs, $tz);
return $result;
}