Views date field does not follow custom date format I have a custom date format defined (via code), and this is what I see in the administration pages:

Custom Date Formats (png screenshot)

In views, I've attached a field, and trying to use a formatter, but they're all showing up like this:

Views Date Format (png screenshot)

I can't seem to select my m/d/y feature, and even the default (short, medium and long) are strange. I have tried clearing caches, and the usual. The view is being exported with a feature, and I have not tried recreating it, yet. Any ideas?

Here's the code generating the custom date format:

/**
 * Implements hook_date_formats().
 */
function custom_date_formats()
{
  $formats = array();

  $formats[] = array(
      'type' =&gt; 'm_d_y',
      'format' =&gt; 'm/d/Y',
      'locales' =&gt; array(),
  );

  return $formats;
}

/**
 * Implements hook_date_format_types().
 */
function custom_date_format_types()
{
  return array(
      'm_d_y' =&gt; t('m/d/Y'),
  );  
}
I still did not find the answer to this problem, but fixed it. I fixed it by simply saving the custom date format form in Date &amp; Time in Drupal. Simply submitting that form, without making any changes, refreshed the Drupal views, and it started working properly.

I will look into the submit handler to see what caused the problem, and post if I find anything.