? modules/simpletest/tests/343502.test
Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.146
diff -u -p -r1.146 install.php
--- install.php	24 Nov 2008 10:41:39 -0000	1.146
+++ install.php	8 Dec 2008 23:55:33 -0000
@@ -1082,7 +1082,7 @@ function install_configure_form(&$form_s
   $form['server_settings']['date_default_timezone'] = array(
     '#type' => 'select',
     '#title' => st('Default time zone'),
-    '#default_value' => date_default_timezone_get(),
+    '#default_value' => @date_default_timezone_get(),
     '#options' => system_time_zones(),
     '#description' => st('By default, dates in this site will be displayed in the chosen time zone.'),
     '#weight' => 5,
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.835
diff -u -p -r1.835 common.inc
--- includes/common.inc	7 Dec 2008 08:23:07 -0000	1.835
+++ includes/common.inc	8 Dec 2008 23:55:36 -0000
@@ -2878,6 +2878,9 @@ function _drupal_bootstrap_full() {
   set_error_handler('_drupal_error_handler');
   set_exception_handler('_drupal_exception_handler');
 
+  // Set the default timezone
+  date_default_timezone_set(variable_get('date_default_timezone', 'UTC'));
+
   // Emit the correct charset HTTP header.
   drupal_set_header('Content-Type: text/html; charset=utf-8');
   // Detect string handling method
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.110
diff -u -p -r1.110 system.admin.inc
--- modules/system/system.admin.inc	26 Nov 2008 13:54:05 -0000	1.110
+++ modules/system/system.admin.inc	8 Dec 2008 23:55:38 -0000
@@ -1564,7 +1564,7 @@ function system_date_time_settings() {
   $form['locale']['date_default_timezone'] = array(
     '#type' => 'select',
     '#title' => t('Default time zone'),
-    '#default_value' => variable_get('date_default_timezone', date_default_timezone_get()),
+    '#default_value' => variable_get('date_default_timezone', @date_default_timezone_get()),
     '#options' => $zones,
     '#description' => t('Select the default site time zone.')
   );
