diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/EventAdminServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/EventAdminServlet.java
index 8fa969c..58a0d65 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/EventAdminServlet.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/EventAdminServlet.java
@@ -98,7 +98,7 @@
         {
             synchronized ( this.events )
             {
-                this.events.add(event);
+                this.events.add(new EventInfo(event));
                 if ( events.size() > this.maxSize )
                 {
                     events.remove(0);
@@ -141,8 +141,7 @@
             // display list in reverse order
             for(int index = copiedEvents.size() -1; index >= 0; index--)
             {
-                eventJson( jw, (Event)copiedEvents.get(index), index );
-                index++;
+                eventJson( jw, (EventInfo)copiedEvents.get(index), index );
             }
 
             jw.endArray();
@@ -160,12 +159,15 @@
         Util.endScript( pw );
     }
 
-    private void eventJson( JSONWriter jw, Event e, int index)
+    private void eventJson( JSONWriter jw, EventInfo info, int index)
     throws JSONException
     {
+        final Event e = info.event;
         jw.object();
         jw.key( "id" );
         jw.value( String.valueOf(index) );
+        jw.key( "received");
+        jw.value( info.received );
         jw.key( "topic" );
         jw.value( e.getTopic());
         jw.key( "properties" );
@@ -184,4 +186,16 @@
         jw.endObject();
     }
 
+    private static final class EventInfo
+    {
+
+        public final Event event;
+        public final long  received;
+
+        public EventInfo(final Event e)
+        {
+            this.event = e;
+            this.received = System.currentTimeMillis();
+        }
+    }
 }
diff --git a/webconsole/src/main/resources/res/ui/events.js b/webconsole/src/main/resources/res/ui/events.js
index 76c8655..82a7093 100644
--- a/webconsole/src/main/resources/res/ui/events.js
+++ b/webconsole/src/main/resources/res/ui/events.js
@@ -24,7 +24,8 @@
     document.write( "</tr>" );
 
     document.write( "<tr class='content'>" );
-    document.write( "<th class='content' width='20%'>Topic</th>" );
+    document.write( "<th class='content'>Received</th>" );
+    document.write( "<th class='content'>Topic</th>" );
     document.write( "<th class='content'>Properties</th>" );
     document.write( "</tr>" );
 
@@ -81,7 +82,8 @@
     var topic = dataEntry.topic;
     var properties = dataEntry.properties;
 
-    parent.appendChild( td( "content", { width: "20%"}, [ text( topic ) ] ) );
+    parent.appendChild( td( "content", null, [ text( new Date(dataEntry.received) ) ] ) );
+    parent.appendChild( td( "content", { "width": "20%", [ text( topic ) ] ) );
 
     var tableE = createElement("table");
     var bodyE = createElement("tbody");
@@ -100,8 +102,8 @@
 function renderEvents( /* Array of Data Objects */ bundleData )
 {
 
-    // topic and properties
-    var columns = 2;
+    // date, topic and properties
+    var columns = 3;
     
     header( columns );
 
