diff -c -r 3.0.4.orig/addons/custom_graph_interface.php 3.0.4.1/addons/custom_graph_interface.php
*** 3.0.4.orig/addons/custom_graph_interface.php	Mon Jan 15 12:55:46 2007
--- 3.0.4.1/addons/custom_graph_interface.php	Mon Jul 16 15:49:05 2007
***************
*** 9,14 ****
--- 9,16 ----
  
  
  include_once "__CONFIG_FILE__";
+ include_once "../calendar.php";
+ $calendar_head = str_replace("jscal", "../jscal", $calendar_head);
  
  #
  # Get directory containing RRDs
***************
*** 252,258 ****
--- 254,263 ----
  # Page rendering begins here
  #
  echo "<html>\n";
+ echo "<head>\n";
  echo "<title>Ganglia: Custom graphs for $_POST[custom_graph_view]</title>\n";
+ echo $calendar_head;
+ echo "</head>\n";
  echo "<body>\n";
  
  
***************
*** 414,420 ****
  # Start time
  #
  echo "<td>Start time: &nbsp;";
! echo "<td><input type=\"text\" name=\"start_time\"";
  if (!empty($_POST['start_time']))
  	echo " value=\"$_POST[start_time]\"";
  else {
--- 419,425 ----
  # Start time
  #
  echo "<td>Start time: &nbsp;";
! echo "<td><input type=\"text\" name=\"start_time\" id=\"cs\"";
  if (!empty($_POST['start_time']))
  	echo " value=\"$_POST[start_time]\"";
  else {
***************
*** 428,434 ****
  		case "year":  $start_time -= 31449600; break;
  		default: $start_time -= 3600;
  	}
! 	$human_time = date("j F Y  H:i", $start_time);
  	echo " value=\"$human_time\"";
  }
  echo ">&nbsp;</td>\n";
--- 433,439 ----
  		case "year":  $start_time -= 31449600; break;
  		default: $start_time -= 3600;
  	}
! 	$human_time = date("M j Y  H:i", $start_time);
  	echo " value=\"$human_time\"";
  }
  echo ">&nbsp;</td>\n";
***************
*** 438,451 ****
  # End time
  #
  echo "<td>End time: &nbsp;";
! echo "<td><input type=\"text\" name=\"end_time\"";
  if (!empty($_POST['end_time']))
  	echo " value=\"$_POST[end_time]\"";
  else {
! 	$human_time = date("j F Y  H:i");
  	echo " value=\"$human_time\"";
  }
  echo ">&nbsp;</td>\n";
  echo "<tr>\n";
  
  #
--- 443,457 ----
  # End time
  #
  echo "<td>End time: &nbsp;";
! echo "<td><input type=\"text\" name=\"end_time\" id=\"ce\"";
  if (!empty($_POST['end_time']))
  	echo " value=\"$_POST[end_time]\"";
  else {
! 	$human_time = date("M j Y  H:i");
  	echo " value=\"$human_time\"";
  }
  echo ">&nbsp;</td>\n";
+ echo $calendar;
  echo "<tr>\n";
  
  #
diff -c -r 3.0.4.orig/addons/custom_graph_rendering.php 3.0.4.1/addons/custom_graph_rendering.php
*** 3.0.4.orig/addons/custom_graph_rendering.php	Sun Feb 11 14:26:59 2007
--- 3.0.4.1/addons/custom_graph_rendering.php	Mon Jul 16 15:34:22 2007
***************
*** 126,139 ****
  	$end_time = isset($_SESSION['end_time']) ?
  		$_SESSION['end_time'] : NULL;
  	$title .= " ($start_time till $end_time)";
- 	$start_time = strtotime($start_time);
- 	$end_time = strtotime($end_time);
- 	if ($start_time == -1 or $end_time == -1) {
- 		echo "Invalid time string supplied, convertion failed:<br>";
- 		echo '$start_time ' ."($_SESSION[start_time]) = $start_time<br>";
- 		echo '$end_time ' ."($_SESSION[end_time]) = $end_time<br>";
- 		exit;
- 	}
  }
  
  
--- 126,131 ----
***************
*** 281,287 ****
  #
  # Add metric parameters to command line
  #
! $command = "$rrdtool graph $output_file --start $start_time --end $end_time --width $width --height $height";
  $command .= "$opt_cmdline $legend_header";
  ksort($metrics_cmdline);
  foreach ($metrics_cmdline as $cmdline_arg)
--- 273,279 ----
  #
  # Add metric parameters to command line
  #
! $command = "$rrdtool graph $output_file --start '$start_time' --end '$end_time' --width $width --height $height";
  $command .= "$opt_cmdline $legend_header";
  ksort($metrics_cmdline);
  foreach ($metrics_cmdline as $cmdline_arg)
