I have the following code working well to prepopulate the from cck date field but I now realise that I need to also inject the same date in the To. Currently the time that is prepopulated is 00:00 so if it helps Iam happy to use the same variable for from and to. That way all the user has to do it alter the times in each case. Could you advise how I should adapt the code below please

<?php
// This function adds a '+' next to each datebox with a link to the event node creation page,
// if the current user has permission to create events.
// Replace 'addplus' with the name of your module.
// Replace 'event' with the name of your CCK content type.
function addplus_preprocess_calendar_datebox(&$vars) {
    global $user;
  if (user_access('create event content', $user)) {
$options = array();
$options['query'] = array('edit[field_date][und][0][value][date]' => $vars['date'].' 00:00');
$options['attributes'] = array('title' => 'Add an event for THIS day');
   
 if($vars['view']->name == 'calendar_resources'){
    
$options['query'] = array('edit[field_datebook4][und][0][value][date]' => $vars['date'].' 00:00');
    $vars['add_event_link'] = l('+', 'node/add/resource-booking', $options);
} else {
    
$options['query'] = array('edit[field_date][und][0][value][date]' => $vars['date'].' 00:00');
    $vars['add_event_link'] = l('+', 'node/add/article', $options);
}
      
}
}
function addplus_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'article_node_form' && arg(3) != '') {
     $form['field_date']['#default_value']['value'] = arg(3) . ' 12:00:00';
     $form['field_date']['#default_value']['value2'] = arg(3) . ' 13:00:00';
  }

  if (!empty($form['actions'])) {
    foreach ($form['actions'] as $name => $button) {
      $form['actions-top'][$name] = $button;
    }
    $form['actions-top']['#weight'] = -100;
  }
}