Index: /trunk/web2/addons/job_monarch/jobstore.php
===================================================================
--- /trunk/web2/addons/job_monarch/jobstore.php	(revision 533)
+++ /trunk/web2/addons/job_monarch/jobstore.php	(revision 534)
@@ -67,11 +67,15 @@
 	foreach( $jobs as $jobid => $jobattrs )
 	{
-		//$jr		= $jobattrs;
-		$jr['jid']	= strval( $jobid );
-		$jr['status']	= $jobattrs['status'];
-		$jr['owner']	= $jobattrs['owner'];
-		$jr['queue']	= $jobattrs['queue'];
-		$jr['name']	= $jobattrs['name'];
-		$jr['requested_time']	= $jobattrs['requested_time'];
+		if( $reported != $heartbeat )
+		{ // Old job: skip
+			continue;
+		}
+
+		$jr['jid']		= strval( $jobid );
+		$jr['status']		= $jobattrs['status'];
+		$jr['owner']		= $jobattrs['owner'];
+		$jr['queue']		= $jobattrs['queue'];
+		$jr['name']		= $jobattrs['name'];
+		$jr['requested_time']	= makeTime( timeToEpoch( $jobattrs['requested_time'] ) );
 
 		if( $jobattrs[status] == 'R' )
@@ -84,10 +88,10 @@
 		}
 
-		unset( $jr['nodes'] );
-		unset( $jr['poll_interval'] );
-		unset( $jr['reported'] );
+		//unset( $jr['nodes'] );
+		//unset( $jr['poll_interval'] );
+		//unset( $jr['reported'] );
 
-		$jr['ppn']	= strval( $jobattrs[ppn] ? $jobattrs[ppn] : 1 );
-		$jr['cpu']	= strval( $nodes * (int) $ppn );
+		$jr['ppn']		= strval( $jobattrs[ppn] ? $jobattrs[ppn] : 1 );
+		$jr['cpu']		= strval( $nodes * (int) $ppn );
 
 
@@ -96,8 +100,9 @@
 			$jr['nodes']	= implode( ",", $jobattrs['nodes'] );
 		}
-		$jr['queued_timestamp']	= $jobattrs['queued_timestamp'];
-		$jr['start_timestamp']	= ($jobattrs['start_timestamp'] ? $jobattrs['start_timestamp'] : "");
 
-		$jobresults[]	= $jr;
+		$jr['queued_timestamp']	= makeDate( $jobattrs['queued_timestamp'] );
+		$jr['start_timestamp']	= ($jobattrs['start_timestamp'] ? makeDate( $jobattrs['start_timestamp'] ) : "");
+
+		$jobresults[]		= $jr;
 	}
 
Index: /trunk/web2/addons/job_monarch/js/jobgrid.js
===================================================================
--- /trunk/web2/addons/job_monarch/js/jobgrid.js	(revision 533)
+++ /trunk/web2/addons/job_monarch/js/jobgrid.js	(revision 534)
@@ -70,5 +70,5 @@
         hidden: false
       },{
-        header: 'Requested CPU time',
+        header: 'Requested Time',
         readOnly: true,
         dataIndex: 'requested_time',
@@ -103,5 +103,5 @@
         readOnly: true,
         dataIndex: 'queued_timestamp',
-        width: 100,
+        width: 140,
         hidden: false
       },{
@@ -109,5 +109,5 @@
         readOnly: true,
         dataIndex: 'start_timestamp',
-        width: 100,
+        width: 140,
         hidden: false
       }]
@@ -1179,5 +1179,6 @@
       items: JobListingEditorGrid
     });
-  
+
+  //debug();  
   JobsDataStore.load();
   //JobListingEditorGrid.render();
Index: unk/web2/addons/job_monarch/js/mainscript.js
===================================================================
--- /trunk/web2/addons/job_monarch/js/mainscript.js	(revision 533)
+++ 	(revision )
@@ -1,127 +1,0 @@
-var PresidentsDataStore;
-var PresidentsColumnModel;
-var PresidentListingEditorGrid;
-var PresidentListingWindow;
-
-Ext.onReady(function(){
-
-  Ext.QuickTips.init();
-
-  PresidentsDataStore = new Ext.data.Store({
-      id: 'PresidentsDataStore',
-      proxy: new Ext.data.HttpProxy({
-                url: 'database.php', 
-                method: 'POST'
-            }),
-            baseParams:{task: "LISTING"}, // this parameter is passed for any HTTP request
-      reader: new Ext.data.JsonReader({
-        root: 'results',
-        totalProperty: 'total',
-        id: 'id'
-      },[ 
-        {name: 'IDpresident', type: 'int', mapping: 'IDpresident'},
-        {name: 'FirstName', type: 'string', mapping: 'firstname'},
-        {name: 'LastName', type: 'string', mapping: 'lastname'},
-        {name: 'IDparty', type: 'int', mapping: 'IDparty'},
-        {name: 'PartyName', type: 'string', mapping: 'name'},
-        {name: 'TookOffice', type: 'date', mapping: 'tookoffice'},
-        {name: 'LeftOffice', type: 'date', mapping: 'leftoffice'},
-        {name: 'Income', type: 'float', mapping: 'income'}
-      ]),
-      sortInfo:{field: 'IDpresident', direction: "ASC"}
-    });
-    
-  PresidentsColumnModel = new Ext.grid.ColumnModel(
-    [{
-        header: '#',
-        readOnly: true,
-        dataIndex: 'IDpresident',
-        width: 50,
-        hidden: false
-      },{
-        header: 'First Name',
-        dataIndex: 'FirstName',
-        width: 60,
-        editor: new Ext.form.TextField({
-            allowBlank: false,
-            maxLength: 20,
-            maskRe: /([a-zA-Z0-9\s]+)$/
-          })
-      },{
-        header: 'Last Name',
-        dataIndex: 'LastName',
-        width: 80,
-        editor: new Ext.form.TextField({
-          allowBlank: false,
-          maxLength: 20,
-          maskRe: /([a-zA-Z0-9\s]+)$/
-          })
-      },{
-        header: 'ID party',
-        readOnly: true,
-        dataIndex: 'IDparty',
-        width: 50,
-        hidden: true
-      },{
-        header: 'Party',
-        dataIndex: 'PartyName',
-        width: 150,
-        readOnly: true
-      },{
-				header: 'Took Office',
-				dataIndex: 'TookOffice',
-				width: 80,
-				renderer: Ext.util.Format.dateRenderer('m/d/Y'),
-				editor: new Ext.form.DateField({
-					format: 'm/d/Y'
-				}),
-				hidden: false
-		},{
-				header: 'Left Office',
-				dataIndex: 'LeftOffice',
-				width: 80,
-				renderer: Ext.util.Format.dateRenderer('m/d/Y'),
-				editor: new Ext.form.DateField({
-					format: 'm/d/Y'
-				}),
-				hidden: false
-		},{
-        header: "Income",
-        dataIndex: 'Income',
-        width: 150,
-        renderer: function(v){ return '$ ' + v; },
-        editor: new Ext.form.NumberField({
-          allowBlank: false,
-          allowDecimals: true,
-          allowNegative: false,
-          blankText: '0',
-          maxLength: 11
-          })
-      }]
-    );
-    PresidentsColumnModel.defaultSortable= true;
-    
-  PresidentListingEditorGrid =  new Ext.grid.EditorGridPanel({
-      id: 'PresidentListingEditorGrid',
-      store: PresidentsDataStore,
-      cm: PresidentsColumnModel,
-      enableColLock:false,
-      clicksToEdit:1,
-      selModel: new Ext.grid.RowSelectionModel({singleSelect:false})
-    });
-    
-  PresidentListingWindow = new Ext.Window({
-      id: 'PresidentListingWindow',
-      title: 'The Presidents of the USA',
-      closable:true,
-      width:700,
-      height:350,
-      plain:true,
-      layout: 'fit',
-      items: PresidentListingEditorGrid
-    });
-  
-  PresidentsDataStore.load();
-  PresidentListingWindow.show();
-  
-});
Index: /trunk/web2/addons/job_monarch/libtoga.php
===================================================================
--- /trunk/web2/addons/job_monarch/libtoga.php	(revision 533)
+++ /trunk/web2/addons/job_monarch/libtoga.php	(revision 534)
@@ -2388,11 +2388,11 @@
         if( $days > 0 )
 	{
-                if( $days > 1 )
-		{
-                        $day_str .= $days . ' days';
-		}
-                else
-		{
-                        $day_str .= $days . ' day';
+		if( $days > 1 )
+		{
+			$date_str .= $days . ' days';
+		}
+		else
+		{
+			$date_str .= $days . ' day';
 		}
         }
@@ -2403,6 +2403,21 @@
         if( $hours > 0 )
 	{
-                $date_str .= $hours . ':';
-                $date_unit = 'hours'; 
+		if( $hours > 1 )
+		{
+			$date_unit	= 'hours';
+		}
+		else
+		{
+			$date_unit	= 'hour';
+		}
+
+		if( $date_str != '' )
+		{
+			$date_str .= ' ' . $hours . ' ' . $date_unit;
+		}
+		else
+		{
+			$date_str .= $hours . ' ' . $date_unit;
+		}
         }
 
@@ -2412,53 +2427,44 @@
         if( $minutes > 0 )
 	{
-                if( $minutes >= 10 )
-		{
-                        $date_str .= $minutes . ':';
-		}
-                else
-		{
-                        $date_str .= '0' . $minutes . ':';
-		}
-
-                $date_unit = (!isset($date_unit)) ? 'minutes' : $date_unit;
+		if( $minutes > 1 )
+		{
+			$date_unit	= 'minutes';
+		}
+		else
+		{
+			$date_unit	= 'minute';
+		}
+
+		if( $date_str != '' )
+		{
+			$date_str .= ' ' . $minutes . ' ' . $date_unit;
+		}
+		else
+		{
+			$date_str .= $minutes . ' ' . $date_unit;
+		}
         }
-	else
-	{
-                if($hours > 0 )
-		{
-                        $date_str .= '00:';
-                        $date_unit = (!isset($date_unit)) ? 'minutes' : $date_unit;
-                }
+
+        if( $seconds > 0 )
+	{
+		if( $seconds > 1 )
+		{
+			$date_unit	= 'seconds';
+		}
+		else
+		{
+			$date_unit	= 'second';
+		}
+
+		if( $date_str != '' )
+		{
+			$date_str .= ' ' . $seconds . ' ' . $date_unit;
+		}
+		else
+		{
+			$date_str .= $seconds . ' ' . $date_unit;
+		}
         }
 
-        $date_unit = (!isset($date_unit)) ? 'seconds' : $date_unit;
-
-        if( $seconds > 0 )
-	{
-                if( $seconds >= 10 )
-		{
-                        $date_str .= $seconds . ' ' . $date_unit;
-		}
-                else
-		{
-                        $date_str .= '0' . $seconds . ' ' . $date_unit;
-		}
-        }
-	else if ( $hours > 0 or $minutes > 0 )
-	{
-                $date_str .= '00 ' . $date_unit;
-	}
-
-        if( $days > 0)
-	{
-                if( $hours > 0 or $minutes > 0 or $seconds > 0 )
-		{
-                        $date_str = $day_str . ' - ' . $date_str;
-		}
-                else
-		{
-                        $date_str = $day_str;
-		}
-        }
         return $date_str;
 }
Index: /trunk/web2/addons/job_monarch/overview.php
===================================================================
--- /trunk/web2/addons/job_monarch/overview.php	(revision 533)
+++ /trunk/web2/addons/job_monarch/overview.php	(revision 534)
@@ -105,34 +105,4 @@
 }
 
-function timeToEpoch( $time ) 
-{
-	$time_fields	= explode( ':', $time );
-
-	if( count( $time_fields ) == 3 ) 
-	{
-		$hours		= $time_fields[0];
-		$minutes	= $time_fields[1];
-		$seconds	= $time_fields[2];
-
-	} 
-	else if( count( $time_fields ) == 2 ) 
-	{
-		$hours 		= 0;
-		$minutes 	= $time_fields[0];
-		$seconds 	= $time_fields[1];
-
-	} 
-	else if( count( $time_fields ) == 1 ) 
-	{
-		$hours 		= 0;
-		$minutes 	= 0;
-		$seconds 	= $time_fields[0];
-	}
-
-	$myepoch 	= intval( $seconds + (intval( $minutes * 60 )) + (intval( $hours * 3600 )) );
-
-	return $myepoch;
-}
-
 function colorRed( $color ) 
 {
