I installed this module on a new build of 6.14 on PHP 5.3 and received this error:
"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 '-7.0/no DST' instead in C:\inetpub\drupal-6.14\sites\all\modules\backup_migrate\backup_migrate.module on line 479."
I fixed this by adding the following line @ 478:
date_default_timezone_set(variable_get("date_default_timezone_name", 'America/Phoenix'));
This seems to be a PHP 5.3 date() function issue. Please test this fix on a non-production, as I have not done extensive testing to see if this break other things.
Comment | File | Size | Author |
---|---|---|---|
#6 | backup_migrate.date_warning_598636_06.patch | 540 bytes | rfay |
#4 | 598636.patch | 588 bytes | roderik |
Comments
Comment #1
seworthi CreditAttribution: seworthi commentedUpon further investigation, the true problem lies in the core and calling the date(). PHP 5.3 throws errors about not having the timezone set. The post http://drupal.org/node/325827, talks about a fix for drupal 7. Hopefully they will rool this patch down into drupal 6.
Comment #2
hal9000_jr CreditAttribution: hal9000_jr commentedA better fix than editing the Drupal Core is to install the Date module and enable Date API, Date Locale, and Date TimeZone. Also Core Optional Locale. Then, goto Administer Date and set your Timezone.
Comment #3
Dave ReidOr just use format_date() or gmdate() instead of having to rely on a heavy set of modules for one function.
Comment #4
roderikWhen I was patching anyway: no need to leave this open.
Dead simple (and tested), hence RTBC.
Comment #5
FiNeX CreditAttribution: FiNeX commentedPatch #4 works fine in backup and migrate 6.x-2.4.
Comment #6
rfayHere's #4 rerolled for git. It works fine for me. Worth getting this little nit fixed.
Comment #7
ronan CreditAttribution: ronan commentedCommitted to dev. Thanks all.