Index: tap-iostat.c
===================================================================
--- tap-iostat.c	(revision 19389)
+++ tap-iostat.c	(working copy)
@@ -35,13 +35,14 @@
 #include <string.h>
 #include "epan/epan_dissect.h"
 #include "epan/packet_info.h"
-#include <epan/tap.h>
-#include <epan/stat_cmd_args.h>
+#include "epan/timestamp.h"
+#include "epan/tap.h"
+#include "epan/stat_cmd_args.h"
 #include "register.h"
 
-
 typedef struct _io_stat_t {
 	gint32 interval;	/* unit is ms */
+        time_t start_time;
 	guint32 num_items;
 	struct _io_stat_item_t *items;
 	const char **filters;
@@ -77,7 +78,10 @@
 	guint i;
 
 	current_time=((pinfo->fd->rel_ts.secs*1000)+(pinfo->fd->rel_ts.nsecs/1000000));
-
+	if (!mit->parent->start_time) {
+	  mit->parent->start_time = pinfo->fd->abs_ts.secs - pinfo->fd->rel_ts.secs;
+	}
+	
 	/* the prev item before the main one is always the last interval we saw packets for */
 	it=mit->prev;
 
@@ -261,6 +265,8 @@
 	guint32 *num;
 	guint32 i,more_items;
 	gint t;
+	struct tm * tm_time;
+	time_t the_time;
 
 	iot=mit->parent;
 
@@ -336,10 +342,46 @@
 		}
 
 		if(more_items){
-			printf("%03d.%03d-%03d.%03d  ",
-				t/1000,t%1000,
-				(t+iot->interval)/1000,(t+iot->interval)%1000);
-			for(i=0;i<iot->num_items;i++){
+		  the_time=iot->start_time+t/1000;
+		  tm_time = localtime(&the_time );
+		  
+		  switch (timestamp_get_type()) {
+
+		  case TS_ABSOLUTE:
+		    printf("%02d:%02d:%02d  ",
+			   tm_time->tm_hour,
+			   tm_time->tm_min,
+			   tm_time->tm_sec);
+		    break;
+
+		  case TS_ABSOLUTE_WITH_DATE:
+		    printf("%04d-%02d-%02d %02d:%02d:%02d  ",
+			   tm_time->tm_year + 1900,
+			   tm_time->tm_mon + 1,
+			   tm_time->tm_mday,
+			   tm_time->tm_hour,
+			   tm_time->tm_min,
+			   tm_time->tm_sec);
+		    break;
+		    
+		  case TS_RELATIVE:
+		  case TS_NOT_SET:
+		    /* Display the old format */
+		    printf("%03d.%03d-%03d.%03d  ",
+			   t/1000,t%1000,
+			   (t+iot->interval)/1000,(t+iot->interval)%1000);
+		    break;
+
+		  case TS_DELTA:
+		    printf("%03d.%03d  ",
+			   t/1000,t%1000);
+		    break;
+		    
+		  default:
+		    break;
+		  }
+
+		             for(i=0;i<iot->num_items;i++){
 				switch(iot->items[i].calc_type){
 				case CALC_TYPE_BYTES:
 					printf("%6d %9d ",frames[i],counters[i]);
@@ -618,6 +660,7 @@
 	
 	io=g_malloc(sizeof(io_stat_t));
 	io->interval=interval;
+	io->start_time=0;
 	if((!filter)||(filter[0]==0)){
 		io->num_items=1;
 		io->items=g_malloc(sizeof(io_stat_item_t)*io->num_items);
