1
I'm on a fresh installation of XOOPS 2.3.3 and extcal 2.2.2 in a PHP 5.3.0 and MySQL 5 environment.
extcal brings an error in all different views (week-list, month-list, year-list, week-calender, ...). As example the week-list:
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 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/.../modules/extcal/week.php on line 18
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 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/.../modules/extcal/week.php on line 19
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 'Europe/Berlin' for 'CEST/2.0/DST' instead in /home/.../modules/extcal/week.php on line 20
If i change lines 18-19 in week php from
$year = isset($_GET['year']) ? intval($_GET['year']) : date('Y');
$month = isset($_GET['month']) ? intval($_GET['month']) : date('n');
$day = isset($_GET['day']) ? intval($_GET['day']) : date('j');
to
$year = isset($_GET['year']) ? intval($_GET['year']) : date_default_timezone_set('Y');
$month = isset($_GET['month']) ? intval($_GET['month']) : date_default_timezone_set('n');
$day = isset($_GET['day']) ? intval($_GET['day']) : date_default_timezone_set('j');
the error is gone, BUT i don't get todays date! Calender view starts in the year 1999!
What's going wrong here?