Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.1003
diff -u -r1.1003 system.module
--- modules/system/system.module	4 Jan 2011 00:56:23 -0000	1.1003
+++ modules/system/system.module	5 Jan 2011 14:55:08 -0000
@@ -3524,13 +3524,15 @@
  *   - dfid: The date format ID.
  *   - format: The format string.
  *   - type: The machine-readable name of the date type.
- *   - locales: An array of language codes. This can include both 2 character
+ *   - locales: An array of locale codes, representing all the locales that
+ *     this format can apply to. This can include both 2 character language
+ *     codes like 'en and 'fr' and 5 character locale codes like 'en-gb' and
+ *     'en-us'. An empty array indicates the format is not locale-specific.
+ *   - locked: A boolean indicating whether or not this date type should be
  *     language codes like 'en and 'fr' and 5 character language codes like
  *     'en-gb' and 'en-us'.
  *   - locked: A boolean indicating whether or not this date type should be
  *     configurable from the user interface.
- *   - module: The name of the module that defined this date format in its
- *     hook_date_formats(). An empty string if the format was user-defined.
  *   - is_new: A boolean indicating whether or not this date type is as of yet
  *     unsaved in the database.
  *   If $type was defined, only the date formats associated with the given date
@@ -3693,13 +3695,12 @@
  *   - dfid: The date format ID.
  *   - format: The PHP date format string.
  *   - type: The machine-readable name of the date type the format belongs to.
- *   - locales: An array of language codes. This can include both 2 character
- *     language codes like 'en and 'fr' and 5 character language codes like
- *     'en-gb' and 'en-us'.
+ *   - locales: An array of locale codes, representing all the locales that
+ *     this format can apply to. This can include both 2 character language
+ *     codes like 'en and 'fr' and 5 character locale codes like 'en-gb' and
+ *     'en-us'. An empty array indicates the format is not locale-specific.
  *   - locked: A boolean indicating whether or not this date type should be
  *     configurable from the user interface.
- *   - module: The name of the module that defined this format in its
- *     hook_date_formats(). An empty string if the format was user-defined.
  *   - is_new: A boolean indicating whether or not this date type is as of yet
  *     unsaved in the database.
  */
@@ -3748,10 +3749,10 @@
       $date_formats[$record->type] = array();
     }
     $format = (array) $record;
+    unset($format['language']);
     $format['is_new'] = FALSE; // It's in the db, so override this setting.
     // If this format not already present, add it to the array.
     if (!isset($date_formats[$record->type][$record->format])) {
-      $format['module'] = '';
       $format['locales'] = array($record->language);
       $date_formats[$record->type][$record->format] = $format;
     }
