Index: /trunk/ippdb/configure.ac
===================================================================
--- /trunk/ippdb/configure.ac	(revision 9969)
+++ /trunk/ippdb/configure.ac	(revision 9970)
@@ -7,5 +7,5 @@
 AC_PREREQ(2.59)
 
-AC_INIT([ippdb], [0.0.54], [pan-starrs.ifa.hawaii.edu])
+AC_INIT([ippdb], [0.0.55], [pan-starrs.ifa.hawaii.edu])
 AC_CONFIG_SRCDIR([ippdb.pc.in])
 
Index: /trunk/ippdb/src/ippdb.c
===================================================================
--- /trunk/ippdb/src/ippdb.c	(revision 9969)
+++ /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)
Index: /trunk/ippdb/src/ippdb.h
===================================================================
--- /trunk/ippdb/src/ippdb.h	(revision 9969)
+++ /trunk/ippdb/src/ippdb.h	(revision 9970)
@@ -134,4 +134,5 @@
     char            *camera;
     char            *telescope;
+    psTime*         time;
     char            *exp_type;
     char            *uri;
@@ -147,4 +148,5 @@
     const char      *camera,
     const char      *telescope,
+    psTime*         time,
     const char      *exp_type,
     const char      *uri
@@ -181,4 +183,5 @@
     const char      *camera,
     const char      *telescope,
+    psTime*         time,
     const char      *exp_type,
     const char      *uri
Index: /trunk/ippdb/tests/alloc.c
===================================================================
--- /trunk/ippdb/tests/alloc.c	(revision 9969)
+++ /trunk/ippdb/tests/alloc.c	(revision 9970)
@@ -11,5 +11,5 @@
         summitExpRow    *object;
 
-        object = summitExpRowAlloc("a string", "a string", "a string", "a string", "a string"    );
+        object = summitExpRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string"    );
 
         if (!object) {
@@ -26,4 +26,7 @@
         }
         if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/insert.c
===================================================================
--- /trunk/ippdb/tests/insert.c	(revision 9969)
+++ /trunk/ippdb/tests/insert.c	(revision 9970)
@@ -13,5 +13,5 @@
         }
 
-        if (!summitExpInsert(dbh, "a string", "a string", "a string", "a string", "a string")) {
+        if (!summitExpInsert(dbh, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string")) {
             exit(EXIT_FAILURE);
         }
Index: /trunk/ippdb/tests/insertobject.c
===================================================================
--- /trunk/ippdb/tests/insertobject.c	(revision 9969)
+++ /trunk/ippdb/tests/insertobject.c	(revision 9970)
@@ -14,5 +14,5 @@
         }
 
-        object = summitExpRowAlloc("a string", "a string", "a string", "a string", "a string");
+        object = summitExpRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/metadatafromobject.c
===================================================================
--- /trunk/ippdb/tests/metadatafromobject.c	(revision 9969)
+++ /trunk/ippdb/tests/metadatafromobject.c	(revision 9970)
@@ -13,5 +13,5 @@
         bool            status;
 
-        object = summitExpRowAlloc("a string", "a string", "a string", "a string", "a string");
+        object = summitExpRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -34,4 +34,7 @@
         }
         if (strncmp(psMetadataLookupPtr(&status, md, "telescope"), "a string", MAX_STRING_LENGTH)) {
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
             psFree(md);
             exit(EXIT_FAILURE);
Index: /trunk/ippdb/tests/objectfrommetadata.c
===================================================================
--- /trunk/ippdb/tests/objectfrommetadata.c	(revision 9969)
+++ /trunk/ippdb/tests/objectfrommetadata.c	(revision 9970)
@@ -25,4 +25,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
         if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_type", 0, NULL, "a string")) {
             psFree(md);
@@ -51,4 +54,7 @@
         }
         if (strncmp(object->telescope, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
