summaryrefslogtreecommitdiff
path: root/modules/system/system.install
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-06-08 05:44:07 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-06-08 05:44:07 +0000
commit40eeac9ebbb5a02ae9bebcd3191359734ed60176 (patch)
tree54b4b2f7f0f86836f77764a56670c53b006306a4 /modules/system/system.install
parent8dbd4d7edd0dc7383e34373562acc377f6df9e2f (diff)
downloadbrdo-40eeac9ebbb5a02ae9bebcd3191359734ed60176.tar.gz
brdo-40eeac9ebbb5a02ae9bebcd3191359734ed60176.tar.bz2
#805052 follow-up by mikey_p: Fixed Notice in update.php in drupal_session_initialize().
Diffstat (limited to 'modules/system/system.install')
-rw-r--r--modules/system/system.install17
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index 06fb1009f..654ca4ac7 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -1863,11 +1863,22 @@ function system_update_7013() {
// schema found.
}
}
+
+ // Check to see if timezone was overriden in update_prepare_d7_bootstrap().
+ $offset = variable_get('date_temporary_timezone');
+ // If not, use the default.
+ if (!isset($offset)) {
+ $offset = variable_get('date_default_timezone', 0);
+ }
+
// If the previous default time zone was a non-zero offset, guess the site's
// intended time zone based on that offset and the server's daylight saving
// time status.
- if (!$timezone && ($offset = variable_get('date_default_timezone', 0)) && ($timezone_name = timezone_name_from_abbr('', intval($offset), date('I'))) && isset($timezones[$timezone_name])) {
- $timezone = $timezone_name;
+ if (!$timezone && $offset) {
+ $timezone_name = timezone_name_from_abbr('', intval($offset), date('I'));
+ if ($timezone_name && isset($timezones[$timezone_name])) {
+ $timezone = $timezone_name;
+ }
}
// Otherwise, the default time zone offset was zero, which is UTC.
if (!$timezone) {
@@ -1875,6 +1886,8 @@ function system_update_7013() {
}
variable_set('date_default_timezone', $timezone);
drupal_set_message('The default time zone has been set to <em>' . check_plain($timezone) . '</em>. Check the ' . l('date and time configuration page', 'admin/config/regional/settings') . ' to configure it correctly.', 'warning');
+ // Remove temporary override.
+ variable_del('date_temporary_timezone');
}
/**