diff --git a/date.module b/date.module
index a39329b..10d83d6 100644
--- a/date.module
+++ b/date.module
@@ -497,8 +497,6 @@ function date_field_widget_error($element, $error, $form, &$form_state) {
  * Retrieve a date format string from formatter settings.
  */
 function date_formatter_format($formatter, $settings, $granularity = NULL, $langcode = NULL) {
-
-  $default = variable_get('date_format_medium',  'D, m/d/Y - H:i');
   $format_type = !empty($settings['format_type']) ? $settings['format_type'] : 'format_interval';
 
   switch ($formatter) {
@@ -508,6 +506,37 @@ function date_formatter_format($formatter, $settings, $granularity = NULL, $lang
     default:
       $format = system_date_format_locale($langcode, $format_type);
       if (empty($format)) {
+        // If the configuration page at admin/config/regional/date-time was
+        // never saved, the default core date format variables
+        // ('date_format_short', 'date_format_medium', and 'date_format_long')
+        // will not be stored in the database, so we have to define their
+        // expected defaults here.
+        switch ($format_type) {
+          case 'short':
+            $default = 'm/d/Y - H:i';
+            break;
+          case 'long':
+            $default = 'l, F j, Y - H:i';
+            break;
+          // If it's not one of the core date types and isn't stored in the
+          // database, we'll fall back on using the same default format as the
+          // 'medium' type.
+          case 'medium':
+          default:
+            // @todo: If a non-core module provides a date type and does not
+            //   variable_set() a default for it, the default assumed here may
+            //   not be correct (since the default format used by 'medium' may
+            //   not even be one of the allowed formats for the date type in
+            //   question). To fix this properly, we should really call
+            //   system_get_date_formats($format_type) and take the first
+            //   format from that list as the default. However, this function
+            //   is called often (on many different page requests), so calling
+            //   system_get_date_formats() from here would be a performance hit
+            //   since that function writes several records to the database
+            //   during each page request that calls it.
+            $default = 'D, m/d/Y - H:i';
+            break;
+        }
         $format = variable_get('date_format_'. $format_type, $default);
       }      
       break; 
diff --git a/tests/date_field.test b/tests/date_field.test
index 7bf9458..3ea859b 100644
--- a/tests/date_field.test
+++ b/tests/date_field.test
@@ -16,7 +16,6 @@ abstract class DateFieldBasic extends DrupalWebTestCase {
     ));
     $this->drupalLogin($this->privileged_user);
 
-    variable_set('date_format_long', 'D, m/d/Y - H:i:s');
     variable_set('date_popup_timepicker', 'none');
 
     module_load_include('inc', 'node', 'content_types');
@@ -216,9 +215,28 @@ class DateFieldTestCase extends DateFieldBasic {
         $edit[$field_name . '[und][0][value2][time]'] = '11:30';
       }
     }
+    // Test that the date is displayed correctly using both the 'short' and
+    // 'long' date types.
+    //
+    // For the short type, save an explicit format and assert that is the one
+    // which is displayed.
+    variable_set('date_format_short', 'l, m/d/Y - H:i:s');
+    $instance = field_info_instance('node', $field_name, 'story');
+    $instance['display']['default']['settings']['format_type'] = 'short';
+    field_update_instance($instance);
     $this->drupalPost('node/add/story', $edit, t('Save'));
     $this->assertText($edit['title'], "Node has been created");
-    $should_be = $todate ? 'Thu, 10/07/2010 - 10:30 to 11:30' : 'Thu, 10/07/2010 - 10:30';
-    $this->assertText($should_be, "Found the correct date for a $field_type field using the $widget_type widget.");
+    $should_be = $todate ? 'Thursday, 10/07/2010 - 10:30 to 11:30' : 'Thursday, 10/07/2010 - 10:30';
+    $this->assertText($should_be, "Found the correct date for a $field_type field using the $widget_type widget displayed using the short date format.");
+    // For the long format, do not save anything, and assert that the displayed
+    // date uses the expected default value of this format provided by Drupal
+    // core ('l, F j, Y - H:i').
+    $instance = field_info_instance('node', $field_name, 'story');
+    $instance['display']['default']['settings']['format_type'] = 'long';
+    field_update_instance($instance);
+    $this->drupalPost('node/add/story', $edit, t('Save'));
+    $this->assertText($edit['title'], "Node has been created");
+    $should_be = $todate ? 'Thursday, October 7, 2010 - 10:30 to 11:30' : 'Thursday, October 7, 2010 - 10:30';
+    $this->assertText($should_be, "Found the correct date for a $field_type field using the $widget_type widget displayed using the long date format.");
   }
-}
\ No newline at end of file
+}
diff --git a/tests/date_timezone.test b/tests/date_timezone.test
index 6e57a2c..c80ec29 100644
--- a/tests/date_timezone.test
+++ b/tests/date_timezone.test
@@ -39,6 +39,7 @@ class DateTimezoneTestCase extends DateFieldBasic {
   }
 
   public function dateForm($field_name, $field_type, $max_granularity, $tz_handling) {
+    variable_set('date_format_long', 'D, m/d/Y - H:i:s');
     $edit = array();
     $edit['title'] = $this->randomName(8);
     $edit[$field_name . '[und][0][show_todate]'] = '1';
