Workaround warnings like "It is not safe to rely on the system's timezone settings..." using strtotime() and date()
When running cron.php from CLI you might get a warning like "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 ..."
Best solution is to set the time zone in the CLI version of php.ini, suggested in http://drupal.org/node/615438#comment-2195208
A workaround is to set the time zone in cron.php
<?php
date_default_timezone_set('Europe/Berlin');
?>
If you use date_default_timezone_get(), like below, you will still get a warning in watchdog
<?php
if (!date_default_timezone_get()) {
date_default_timezone_set('Europe/Berlin');
}
?>