### Eclipse Workspace Patch 1.0
#P wordpress-trunk
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 12605)
+++ wp-includes/functions.php	(working copy)
@@ -6,41 +6,47 @@
  */
 
 /**
- * Converts MySQL DATETIME field to user specified date format.
+ * Format MySQL Datetime 
+ * 
+ * Converts MySQL DATETIME field to specified format.
+ * 
+ * Format:
  *
- * If $dateformatstring has 'G' value, then gmmktime() function will be used to
- * make the time. If $dateformatstring is set to 'U', then mktime() function
- * will be used to make the time.
- *
- * The $translate will only be used, if it is set to true and it is by default
- * and if the $wp_locale object has the month and weekday set.
- *
+ *   'G'   : strtotime ( date +0000 )
+ *   'U'   : strtotime ( date )
+ *   other : format according to php date() function
+ * 
+ * @link http://www.php.net/strtotime 
+ * @link http://www.php.net/date
+ * 
+ * Prevent locale formattings by setting the optional $translate parameter 
+ * to false.
+ * 
  * @since 0.71
- *
- * @param string $dateformatstring Either 'G', 'U', or php date format.
- * @param string $mysqlstring Time from mysql DATETIME field.
- * @param bool $translate Optional. Default is true. Will switch format to locale.
- * @return string Date formated by $dateformatstring or locale (if available).
+ * @param string  $dateformatstring Either 'G', 'U', or php date format.
+ * @param string  $mysqlstring      Time from mysql DATETIME field.
+ * @param bool    $translate        (optional) Format to locale, default is true.
+ * @return string|false Formatted date, false on error.
  */
-function mysql2date( $dateformatstring, $mysqlstring, $translate = true ) {
-	global $wp_locale;
-	$m = $mysqlstring;
-	if ( empty( $m ) )
+function mysql2date( $dateformatstring, $mysqlstring, $translate = true ) {	
+	if ( empty( $mysqlstring ) )
 		return false;
 
-	if( 'G' == $dateformatstring ) {
-		return strtotime( $m . ' +0000' );
-	}
+	if( 'G' == $dateformatstring )
+		return strtotime( $mysqlstring . ' +0000' );
 
-	$i = strtotime( $m );
+	$timestamp = strtotime( $mysqlstring );
+	
+	if ( false === $timestamp )
+		return false;
 
 	if( 'U' == $dateformatstring )
-		return $i;
+		return $time;
 
-	if ( $translate)
-	    return date_i18n( $dateformatstring, $i );
+	if ( $translate )
+	    return date_i18n( $dateformatstring, $timestamp );
 	else
-	    return date( $dateformatstring, $i );
+	    return date( $dateformatstring, $timestamp );
 }
 
 /**
