I am upgrading one of my websites from 6.20 to 7.0 and when I run the update.php the following error displays before doing the update:
Notice: date_default_timezone_set() [function.date-default-timezone-set]: Timezone ID '3600' is invalid in drupal_session_initialize() (line 262 of /.../includes/session.inc).
My website is in the Brussels timezone.
At the end of the update process, I get the much more friendly following messages:
Some user time zones have been emptied and need to be set to the correct values. Use the new time zone options to choose whether to remind users at login to set the correct time zone.
The default time zone has been set to Europe/London. Check the date and time configuration page to configure it correctly.
I don't think I should be given such a scary notice message at the start.
Comment | File | Size | Author |
---|---|---|---|
#11 | fix-timezone-1020748.patch | 920 bytes | xiukun.zhou |
Comments
Comment #1
bfroehle CreditAttribution: bfroehle commentedYes, the notice exists because D6 used numeric timezone offsets whereas D7 uses actual timezones. Perhaps we should add a
!is_numeric($user->timezone)
check in drupal_get_user_timezone()?Comment #2
drupalshrek CreditAttribution: drupalshrek commentedIf it's a known thing which happens, then I would suggest either:
a) to hide the notice message if Drupal upgrade will automatically deal with it
b) if necessary, give a user-friendly message such as:
My preference is for option (a); if the user doesn't need to know, don't bother him.
Comment #3
mcduarte2000 CreditAttribution: mcduarte2000 commentedYes, I just got this error and I also got worried... Even because the update process is quite slow and I was starting to think something was wrong...
Comment #4
clashar CreditAttribution: clashar commentedsubscribe, got the same message
Comment #5
mstrelan CreditAttribution: mstrelan commented+1
Comment #6
drzraf CreditAttribution: drzraf commented+1
Comment #7
drzraf CreditAttribution: drzraf commentedI would increase the priority. This bug absolutely lock Drupal.
No clear-cache, nothing works.
Even
drush vset date_default_timezone Europe/Paris
won't bootstrap enough to do the update.Workaround:
mysql<<<"UPDATE variable SET value = 's:12:\"Europe/Paris\";' WHERE name = 'date_default_timezone'"
Comment #8
drzraf CreditAttribution: drzraf commentedBut this the tree hiding the forest. I'm still getting a WSOD after a fixed
date_default_timezone
.Comment #9
Damien Tournoud CreditAttribution: Damien Tournoud commentedComment #10
drzraf CreditAttribution: drzraf commentedconfirmed that it's only a notice (my WSOD is about something different: #1862388: comment.module keeping Drupal from bootstrap)
Comment #11
xiukun.zhou CreditAttribution: xiukun.zhou commentedComment #12
drzraf CreditAttribution: drzraf commentedpatch works for me. no notice anymore
Comment #13
kurund CreditAttribution: kurund commentedpatch worked for me. No notice anymore..