Index: scheduler.module
===================================================================
--- scheduler.module	(revision 63)
+++ scheduler.module	(working copy)
@@ -584,3 +584,53 @@
 
   return $fields;
 }
+
+
+
+/**
+* Implementation of hook_feeds_node_processor_targets_alter().
+*/
+function scheduler_feeds_node_processor_targets_alter(&$targets, $content_type) {
+  $target = array();
+
+  if (variable_get('scheduler_'. $content_type, FALSE)) {
+    $targets['publish_on'] = array(
+      'name' => t('Scheduler: publish on'),
+      'description' => t('The date, when scheduler module should publish node.'),
+      'callback' => 'scheduler_set_target'
+    );
+
+    $targets['unpublish_on'] = array(
+      'name' => t('Scheduler: unpublish on'),
+      'description' => t('The date, when scheduler module should unpublish node.'),
+      'callback' => 'scheduler_set_target'
+    );
+  }
+
+  return $targets;
+}
+
+
+/**
+* Mapping callback.
+* 
+* This callback converts (using date_api) input from parser and converts it
+* to timestamp form. After that it's set value of correct field of node.
+*/
+function scheduler_set_target($node, $target, $value) {
+  if (module_exists('date_api')) {
+
+    if (!is_array($value)) {
+      //date_make_date should detect form of $value form and 
+      //convert it to DateTime object. I hope that this is 
+      //php4 compatible :)
+      $date = date_make_date($value);
+
+      //if date_make_date created object, we can convert it to unix timestamp
+      //and assign to proper field of node.
+      if (!is_null($date)) {
+        $node->$target = date_convert($date, DATE_OBJECT, DATE_UNIX);
+      }
+    }
+  }
+}
