Index: src/wp-includes/functions.php
===================================================================
--- src/wp-includes/functions.php	(revision 25762)
+++ src/wp-includes/functions.php	(working copy)
@@ -118,24 +118,36 @@
 
 		$dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 );
 	}
+
 	$timezone_formats = array( 'P', 'I', 'O', 'T', 'Z', 'e' );
 	$timezone_formats_re = implode( '|', $timezone_formats );
-	if ( preg_match( "/$timezone_formats_re/", $dateformatstring ) ) {
-		$timezone_string = get_option( 'timezone_string' );
-		if ( $timezone_string ) {
-			$timezone_object = timezone_open( $timezone_string );
-			$date_object = date_create( null, $timezone_object );
-			foreach( $timezone_formats as $timezone_format ) {
-				if ( false !== strpos( $dateformatstring, $timezone_format ) ) {
-					$formatted = date_format( $date_object, $timezone_format );
-					$dateformatstring = ' '.$dateformatstring;
-					$dateformatstring = preg_replace( "/([^\\\])$timezone_format/", "\\1" . backslashit( $formatted ), $dateformatstring );
-					$dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 );
-				}
+
+	$timezone_string = get_option( 'timezone_string' );
+	if ( $timezone_string ) {
+		$timezone_object = timezone_open( $timezone_string );
+	}
+
+	if ( preg_match( "/$timezone_formats_re/", $dateformatstring ) && $timezone_string ) {
+		$date_object = date_create( null, $timezone_object );
+		foreach( $timezone_formats as $timezone_format ) {
+			if ( false !== strpos( $dateformatstring, $timezone_format ) ) {
+				$formatted = date_format( $date_object, $timezone_format );
+				$dateformatstring = ' '.$dateformatstring;
+				$dateformatstring = preg_replace( "/([^\\\])$timezone_format/", "\\1" . backslashit( $formatted ), $dateformatstring );
+				$dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 );
 			}
 		}
 	}
-	$j = @$datefunc( $dateformatstring, $i );
+
+	if ( !$gmt && $timezone_string ) {
+		$localdateobject = date_create( null, $timezone_object );
+		date_timestamp_set( $localdateobject, $i );
+		$j = date_format( $localdateobject, $dateformatstring );
+	}
+	else {
+		$j = @$datefunc( $dateformatstring, $i );
+	}
+
 	// allow plugins to redo this entirely for languages with untypical grammars
 	$j = apply_filters('date_i18n', $j, $req_format, $i, $gmt);
 	return $j;
