Possibly related to:
Years get a year subtracted on submit
http://drupal.org/node/258688

Installed dev version to remedy years getting subtracted as detailed in the issue above only to find it creates the opposite problem.

Granularity set to Year.

Date field export follows:

$content[type]  = array (
  'name' => 'Listing',
  'type' => 'listing',
  'description' => '',
  'title_label' => 'MLS #',
  'body_label' => '',
  'min_word_count' => '0',
  'help' => '',
  'node_options' => 
  array (
    'status' => true,
    'promote' => false,
    'sticky' => false,
    'revision' => false,
  ),
  'nodefamily_max' => '0',
  'nodeprofile' => 0,
  'comment' => '0',
  'old_type' => 'listing',
  'orig_type' => '',
  'module' => 'node',
  'custom' => '1',
  'modified' => '1',
  'locked' => '0',
  'ant' => '0',
  'ant_pattern' => '',
  'ant_php' => 0,
);
$content[fields]  = array (
  0 => 
  array (
    'widget_type' => 'date_text',
    'label' => 'date_test',
    'weight' => '0',
    'default_value' => 'blank',
    'default_value_code' => '',
    'default_value2' => 'same',
    'default_value_code2' => '',
    'input_format' => 'Y-m-d H:i:s',
    'input_format_custom' => 'Y',
    'advanced' => 
    array (
      'label_position' => 'above',
      'text_parts' => 
      array (
        'year' => 0,
        'month' => 0,
        'day' => 0,
        'hour' => 0,
        'minute' => 0,
        'second' => 0,
      ),
    ),
    'increment' => 1,
    'year_range' => '-3:+3',
    'description' => '',
    'group' => false,
    'required' => '0',
    'multiple' => '0',
    'repeat' => 0,
    'todate' => '',
    'granularity' => 
    array (
      'year' => true,
      0 => 1,
      'month' => false,
      'day' => false,
      'hour' => false,
      'minute' => false,
      'second' => false,
    ),
    'output_format_date' => 'Y M j',
    'output_format_custom' => 'Y',
    'output_format_date_long' => 'l, F j, Y - g:ia',
    'output_format_custom_long' => '',
    'output_format_date_medium' => 'D, m/d/Y - g:ia',
    'output_format_custom_medium' => '',
    'output_format_date_short' => 'm/d/Y - g:ia',
    'output_format_custom_short' => '',
    'tz_handling' => 'none',
    'timezone_db' => 'UTC',
    'field_name' => 'field_date_test',
    'field_type' => 'datestamp',
    'module' => 'date',
    'label_position' => 'above',
    'text_parts' => 
    array (
    ),
  ),
);

Comments

KarenS’s picture

Status: Active » Fixed

I just checked in a fix for this to make sure text date fields with year only or year and month only will work right. I think the other types of dates were already fixed, but I'll double-check that, too.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.