Index: formatting.php
===================================================================
--- formatting.php	(revision 8781)
+++ formatting.php	(working copy)
@@ -1208,17 +1208,17 @@
 /**
  * Converts an iso8601 date to MySQL DateTime format used by post_date[_gmt].
  *
- * {@internal Missing Long Description}}
- *
  * @since 1.5.0
  *
  * @param string $date_string Date and time in ISO 8601 format {@link http://en.wikipedia.org/wiki/ISO_8601}.
- * @param unknown_type $timezone Optional. If set to GMT returns the time minus gmt_offset. Default USER.
+ * @param unknown_type $timezone Optional. If set to GMT returns the time minus gmt_offset. Default is 'user'.
  * @return string The date and time in MySQL DateTime format - Y-m-d H:i:s.
  */
-function iso8601_to_datetime($date_string, $timezone = USER) {
-	if ($timezone == GMT) {
+function iso8601_to_datetime($date_string, $timezone = 'user') {
+	$timezone = strtolower($timezone);
 
+	if ($timezone == 'gmt') {
+
 		preg_match('#([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(Z|[\+|\-][0-9]{2,4}){0,1}#', $date_string, $date_bits);
 
 		if (!empty($date_bits[7])) { // we have a timezone, so let's compute an offset
@@ -1232,7 +1232,7 @@
 
 		return gmdate('Y-m-d H:i:s', $timestamp);
 
-	} else if ($timezone == USER) {
+	} else if ($timezone == 'user') {
 		return preg_replace('#([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(Z|[\+|\-][0-9]{2,4}){0,1}#', '$1-$2-$3 $4:$5:$6', $date_string);
 	}
 }
