Index: trunk/tools/czarplot.pl
===================================================================
--- trunk/tools/czarplot.pl	(revision 30251)
+++ trunk/tools/czarplot.pl	(revision 30254)
@@ -122,4 +122,5 @@
 my $czarDb = $config->getCzarDbInstance();
 
+my $newDayTime =  $config->getMetricsStartTime();
 
 my $plotter = undef; 
@@ -133,5 +134,5 @@
 }
 
-# sort out times
+# if a single day has been chosen 
 if($day) {
 
@@ -143,7 +144,9 @@
     else {
 
-        # day plots should run from about 6:30am until midnight
-        $begin = "$day 06:35";
-        $end = "$day 23:59";
+        # plots should span 24 housr from previous day
+        my $dayBefore = $czarDb->subtractInterval($day, "1 DAY");
+                
+        $begin = "$dayBefore $newDayTime";
+        $end = "$day $newDayTime";
     }
 }
@@ -153,6 +156,11 @@
     if (!$begin) {
 
+        my $today = strftime('%Y-%m-%d', localtime);
+        my $yesterday = $czarDb->subtractInterval($today, "1 DAY");
+
+        
         if ($timeinpast) {$begin = $czarDb->subtractInterval($end, $timeinpast);}
-        else {$begin =  strftime('%Y-%m-%d 06:35',localtime);}
+        elsif ($czarDb->isBefore($end, "$today $newDayTime")) {$begin = "$yesterday $newDayTime";}
+        else {$begin = "$today $newDayTime";}
     }
 }
