Index: install.php
===================================================================
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.56
diff -u -p -r1.56 install.php
--- install.php	2 Jun 2007 11:06:39 -0000	1.56
+++ install.php	4 Jun 2007 05:34:23 -0000
@@ -891,6 +891,7 @@ function install_configure_form() {
     '#weight' => 5,
   );
 
+  drupal_add_js(drupal_get_path('module', 'user') .'/user.js', 'module');
   drupal_add_js(drupal_get_path('module', 'system') .'/system.js', 'module');
   drupal_add_js(array('cleanURL' => array('success' => st('Your server has been successfully tested to support this feature.'), 'failure' => st('Your system configuration does not currently support this feature. The <a href="http://drupal.org/node/15365">handbook page on Clean URLs</a> has additional troubleshooting information.'), 'testing' => st('Testing clean URLs...'))), 'setting');
   drupal_add_js('
@@ -898,7 +899,6 @@ function install_configure_form() {
 if (Drupal.jsEnabled) {
   $(document).ready(function() {
     Drupal.cleanURLsInstallCheck();
-    Drupal.installDefaultTimezone();
   });
 }', 'inline');
 
Index: modules/system/system.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.js,v
retrieving revision 1.7
diff -u -p -r1.7 system.js
--- modules/system/system.js	1 Jun 2007 09:05:45 -0000	1.7
+++ modules/system/system.js	4 Jun 2007 05:34:26 -0000
@@ -52,11 +52,6 @@ Drupal.cleanURLsInstallCheck = function(
   }});
 };
 
-Drupal.installDefaultTimezone = function() {
-  var offset = new Date().getTimezoneOffset() * -60;
-  $("#edit-date-default-timezone").val(offset);
-};
-
 /**
  * Show/hide custom format sections on the date-time settings page.
  */
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.487
diff -u -p -r1.487 system.module
--- modules/system/system.module	1 Jun 2007 09:37:16 -0000	1.487
+++ modules/system/system.module	4 Jun 2007 05:34:40 -0000
@@ -867,6 +867,14 @@ if (Drupal.jsEnabled) {
     '#description' => t('When enabled, users can set their own time zone and dates will be displayed accordingly.')
   );
 
+  $form['locale']['user_register_timezone'] = array(
+    '#type' => 'radios',
+    '#title' => t('Time zone selection at user registration page'),
+    '#default_value' => variable_get('user_register_timezone', 0),
+    '#options' => array(t('Disabled'), t('Enabled')),
+    '#description' => t('When enabled, users can set their own time zone at the user registration form.')
+  );
+
   $form['locale']['date_first_day'] = array(
     '#type' => 'select',
     '#title' => t('First day of week'),
Index: modules/user/user.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.js,v
retrieving revision 1.1
diff -u -p -r1.1 user.js
--- modules/user/user.js	20 May 2007 16:38:19 -0000	1.1
+++ modules/user/user.js	4 Jun 2007 05:34:40 -0000
@@ -5,10 +5,18 @@
  * picture-related form elements depending on the current value of the
  * "Picture support" radio buttons.
  */
+
+Drupal.defaultTimezone = function() {
+  var offset = new Date().getTimezoneOffset() * -60;
+  $("#edit-timezone").val(offset);
+  $("#edit-date-default-timezone").val(offset);
+};
+
 if (Drupal.jsEnabled) {
   $(document).ready(function () {
     $('div.user-admin-picture-radios input[@type=radio]').click(function () {
       $('div.user-admin-picture-settings')[['hide', 'show'][this.value]]();
     });
+    Drupal.defaultTimezone();
   });
 }
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.789
diff -u -p -r1.789 user.module
--- modules/user/user.module	3 Jun 2007 06:17:58 -0000	1.789
+++ modules/user/user.module	4 Jun 2007 05:34:59 -0000
@@ -160,7 +160,7 @@ function user_save($account, $array = ar
         $query .= "$key = '%s', ";
         $v[] = md5($value);
       }
-      else if ((substr($key, 0, 4) !== 'auth') && ($key != 'pass')) {
+      else if ((substr($key, 0, 4) !== 'auth') && ($key != 'pass') && ($key != 'timezone')) {
         if (in_array($key, $user_fields)) {
           // Save standard fields
           $query .= "$key = '%s', ";
@@ -228,7 +228,7 @@ function user_save($account, $array = ar
           break;
         case 'uid':        case 'mode':     case 'sort':
         case 'threshold':  case 'created':  case 'access':
-        case 'login':      case 'status':
+        case 'login':      case 'status':     case 'timezone':
           $fields[] = $key;
           $values[] = $value;
           $s[] = "%d";
@@ -1319,6 +1319,22 @@ function user_register() {
   else {
     $form = array_merge($form, $extra);
   }
+
+  if (variable_get('user_register_timezone', 0)) {
+    $zones = _system_zonelist();
+  
+    $form['timezone'] = array(
+      '#type' => 'select',
+      '#title' => t('Time zone'),
+      '#default_value' => variable_get('date_default_timezone', 0),
+      '#options' => $zones,
+      '#description' => t('Select your current local time. Dates and times throughout this site will be displayed using this time zone.'),
+      '#weight' => 5,
+    );
+
+    drupal_add_js(drupal_get_path('module', 'user') .'/user.js', 'module');
+  }
+
   $form['submit'] = array('#type' => 'submit', '#value' => t('Create new account'), '#weight' => 30);
   $form['#validate'][] = 'user_register_validate';
 
