It Is Not Safe To Rely On The System\'s Timezone Settings. You Are *required* To Use The Date Timezo
- Forums
- PHP
- It Is Not Safe To Rely On The System\'s Timezone Settings. You Are *required* To Use The Date Timezo
this is how i fix this error i got mod_fcgid: stderr: PHP Warning: 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 [8883], Last Updated: Sat May 18, 2024
orlando
Wed Dec 31, 1969
0 Comments
106 Visits
lately i have been looking at my errors, and this is what i saw in my log:
[warn] mod_fcgid: stderr: PHP Warning: 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/Denver' for 'MST/-7.0/no DST' instead in clients/client/web/web/bible/index.php on line 535
so how can i fix this, well, its easy all i had to do was to put the following code in my index.php date_default_timezone_set('America/Los_Angeles'); because my function looked like this:
function phpbbdate($gmepoch){
if(!$gmepoch) $gmepoch ='None';
return gmdate('D M d, Y ', $gmepoch + (3600 * -8));
}
hope that helps you