glosswordteam / Glossword

A free dictionary/glossary script
http://glossword.biz/
38 stars 16 forks source link

date.timezone issue #4

Open zdenop opened 9 years ago

zdenop commented 9 years ago

I move my installation to new hosting and I got this error:

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 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/user/www/glossword/css.php on line 79, referer: http://localhost/glossword/gw_login.php

I put to db_config.php: date_default_timezone_set('Europe/Vienna');

but now I got number of notices: PHP Notice: Undefined index: d in /home/user/www/glossword/index.php on line 217

Is there a better way how to solve the issue with date.timezone?

glosswordteam commented 9 years ago

Add into css.php after define('GW_REQUEST_URI'

if ( function_exists( 'date_default_timezone_set' ) ) {
    date_default_timezone_set( 'UTC' );
}
zdenop commented 9 years ago

Thanks. I did the change of css.php, but I still received notices about undefined index d....