Index: trunk/ippdb/src/ippdb.c
===================================================================
--- trunk/ippdb/src/ippdb.c	(revision 9796)
+++ trunk/ippdb/src/ippdb.c	(revision 9970)
@@ -234,5 +234,5 @@
 static void summitExpRowFree(summitExpRow *object);
 
-summitExpRow *summitExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, const char *exp_type, const char *uri)
+summitExpRow *summitExpRowAlloc(const char *exp_id, const char *camera, const char *telescope, psTime* time, const char *exp_type, const char *uri)
 {
     summitExpRow    *_object;
@@ -244,4 +244,5 @@
     _object->camera = psStringCopy(camera);
     _object->telescope = psStringCopy(telescope);
+    _object->time = psTimeCopy(time);
     _object->exp_type = psStringCopy(exp_type);
     _object->uri = psStringCopy(uri);
@@ -255,4 +256,5 @@
     psFree(object->camera);
     psFree(object->telescope);
+    psFree(object->time);
     psFree(object->exp_type);
     psFree(object->uri);
@@ -277,4 +279,12 @@
         return false;
     }
+    psTime* time = psTimeFromISO("", PS_TIME_UTC);
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "time", PS_DATA_TIME, NULL, time)) {
+        psFree(time);
+        psError(PS_ERR_UNKNOWN, false, "failed to add item time");
+        psFree(md);
+        return false;
+    }
+    psFree(time);
     if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_type", PS_DATA_STRING, NULL, "64")) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item exp_type");
@@ -300,5 +310,5 @@
 }
 
-bool summitExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, const char *exp_type, const char *uri)
+bool summitExpInsert(psDB * dbh, const char *exp_id, const char *camera, const char *telescope, psTime* time, const char *exp_type, const char *uri)
 {
     psMetadata *md = psMetadataAlloc();
@@ -315,4 +325,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "telescope", PS_DATA_STRING, NULL, telescope)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item telescope");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "time", PS_DATA_TIME, NULL, time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item time");
         psFree(md);
         return false;
@@ -351,5 +366,5 @@
 bool summitExpInsertObject(psDB *dbh, summitExpRow *object)
 {
-    return summitExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->exp_type, object->uri);
+    return summitExpInsert(dbh, object->exp_id, object->camera, object->telescope, object->time, object->exp_type, object->uri);
 }
 
@@ -439,4 +454,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "time", PS_DATA_TIME, NULL, object->time)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item time");
+        psFree(md);
+        return false;
+    }
     if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_type", PS_DATA_STRING, NULL, object->exp_type)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item exp_type");
@@ -473,4 +493,9 @@
         return false;
     }
+    psTime* time = psMetadataLookupPtr(&status, md, "time");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item time");
+        return false;
+    }
     char* exp_type = psMetadataLookupPtr(&status, md, "exp_type");
     if (!status) {
@@ -484,5 +509,5 @@
     }
 
-    return summitExpRowAlloc(exp_id, camera, telescope, exp_type, uri);
+    return summitExpRowAlloc(exp_id, camera, telescope, time, exp_type, uri);
 }
 psArray *summitExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
