Index: wp-admin/options-general.php
===================================================================
--- wp-admin/options-general.php	(revision 10473)
+++ wp-admin/options-general.php	(working copy)
@@ -93,6 +93,9 @@
 </td>
 </tr>
 <tr>
+<?php 
+if (!wp_timezone_supported()) : // no magic timezone support here 
+?>
 <th scope="row"><label for="gmt_offset"><?php _e('Timezone') ?> </label></th>
 <td>
 <select name="gmt_offset" id="gmt_offset">
@@ -127,6 +130,26 @@
 <br/>
 <span class="setting-description"><?php _e('Unfortunately, you have to manually update this for Daylight Savings Time. Lame, we know, but will be fixed in the future.'); ?></span>
 </td>
+<?php 
+else: // looks like we can do nice timezone selection!
+$current_offset = get_option('gmt_offset');
+?>
+<th scope="row"><label for="timezone_string"><?php _e('Timezone') ?></label></th>
+<td>
+
+<select id="timezone_string" name="timezone_string">
+<?php echo wp_timezone_choice(get_option('timezone_string')); ?>
+</select>
+
+<span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n(__('Y-m-d G:i:s'), false, 'gmt')); ?></span>
+<?php if (get_option('timezone_string')) : ?>
+	<span id="local-time"><?php printf(__('Current time in %1$s is <code>%2$s</code>'), get_option('timezone_string'), date_i18n(__('Y-m-d G:i:s'))); ?></span>
+<?php endif; ?>
+<br/>
+<span class="setting-description"><?php _e('Choose a city in the same timezone as you.'); ?></span>
+</td>
+
+<?php endif; ?>
 </tr>
 <tr>
 <th scope="row"><?php _e('Date Format') ?></th>
Index: wp-admin/options.php
===================================================================
--- wp-admin/options.php	(revision 10473)
+++ wp-admin/options.php	(working copy)
@@ -22,7 +22,7 @@
 wp_reset_vars(array('action'));
 
 $whitelist_options = array(
-	'general' => array( 'blogname', 'blogdescription', 'admin_email', 'users_can_register', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'default_role' ),
+	'general' => array( 'blogname', 'blogdescription', 'admin_email', 'users_can_register', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'default_role', 'timezone_string' ),
 	'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ),
 	'misc' => array( 'hack_file', 'use_linksupdate', 'uploads_use_yearmonth_folders', 'upload_path', 'upload_url_path' ),
 	'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ),
Index: wp-includes/default-filters.php
===================================================================
--- wp-includes/default-filters.php	(revision 10473)
+++ wp-includes/default-filters.php	(working copy)
@@ -203,4 +203,6 @@
 add_action('edit_form_advanced', 'wp_remember_old_slug');
 add_action('init', '_show_post_preview');
 
+add_filter('pre_option_gmt_offset','wp_timezone_override_offset');
+
 ?>
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 10473)
+++ wp-includes/functions.php	(working copy)
@@ -2902,5 +2902,91 @@
 	return $can_clone ? clone( $object ) : $object;
 }
 
+/**
+ * gmt_offset modification for smart timezone handling
+ * 
+ * Overrides the gmt_offset option if we have a timezone_string available
+ */
+function wp_timezone_override_offset() {
+	if (!wp_timezone_supported()) return false;
 
-?>
+	$tz = get_option('timezone_string');
+	if (empty($tz)) return false;
+
+	@date_default_timezone_set($tz);
+		
+	$dateTimeZoneSelected = timezone_open($tz);
+	$dateTimeServer = date_create();
+	if ($dateTimeZoneSelected === false || $dateTimeServer === false) return false;
+		
+	$timeOffset = timezone_offset_get($dateTimeZoneSelected, $dateTimeServer);
+	$timeOffset = $timeOffset / 3600;
+		
+	return $timeOffset;
+}
+
+/**
+ * Check for PHP timezone support
+ * 
+ */
+function wp_timezone_supported() {
+	if (function_exists('date_default_timezone_set') 
+	    && function_exists('timezone_identifiers_list')
+	    && function_exists('timezone_open') 
+	    && function_exists('timezone_offset_get')
+	    ) 
+	    return true;
+
+	return false;
+}
+
+/**
+ * Gives a nicely formatted list of timezone strings // temporary! Not in final
+ *
+ * @param string $selectedzone - which zone should be the selected one
+ *
+ */
+function wp_timezone_choice($selectedzone) {
+    $all = timezone_identifiers_list();
+
+    $i = 0;
+    foreach($all AS $zone) {
+      $zone = explode('/',$zone);
+      $zonen[$i]['continent'] = isset($zone[0]) ? $zone[0] : '';
+      $zonen[$i]['city'] = isset($zone[1]) ? $zone[1] : '';
+      $zonen[$i]['subcity'] = isset($zone[2]) ? $zone[2] : '';
+      $i++;
+    }
+
+    asort($zonen);
+    $structure = '';
+    foreach($zonen AS $zone) {
+      extract($zone);
+      if($continent == 'Africa' || $continent == 'America' || $continent == 'Antarctica' || $continent == 'Arctic' || $continent == 'Asia' || $continent == 'Atlantic' || $continent == 'Australia' || $continent == 'Europe' || $continent == 'Indian' || $continent == 'Pacific') {
+        if(!isset($selectcontinent)) {
+          $structure .= '<optgroup label="'.$continent.'">'; // continent
+        } elseif($selectcontinent != $continent) {
+          $structure .= '</optgroup><optgroup label="'.$continent.'">'; // continent
+        }
+
+        if(isset($city) != ''){
+          if (!empty($subcity) != ''){
+            $city = $city . '/'. $subcity;
+          }
+          $structure .= "<option ".((($continent.'/'.$city)==$selectedzone)?'selected="selected "':'')." value=\"".($continent.'/'.$city)."\">".str_replace('_',' ',$city)."</option>"; //Timezone
+        } else {
+          if (!empty($subcity) != ''){
+            $city = $city . '/'. $subcity;
+          }
+          $structure .= "<option ".(($continent==$selectedzone)?'selected="selected "':'')." value=\"".$continent."\">".$continent."</option>"; //Timezone
+        }
+
+        $selectcontinent = $continent;
+      }
+    }
+    $structure .= '</optgroup>';
+    return $structure;
+}
+
+
+?>
\ No newline at end of file

