Index: trunk/ippdb/configure.ac
===================================================================
--- trunk/ippdb/configure.ac	(revision 17840)
+++ trunk/ippdb/configure.ac	(revision 17872)
@@ -7,5 +7,5 @@
 AC_PREREQ(2.61)
 
-AC_INIT([ippdb], [1.1.36], [pan-starrs.ifa.hawaii.edu])
+AC_INIT([ippdb], [1.1.37], [pan-starrs.ifa.hawaii.edu])
 AC_CONFIG_SRCDIR([ippdb.pc.in])
 
Index: trunk/ippdb/src/ippdb.c
===================================================================
--- trunk/ippdb/src/ippdb.c	(revision 17840)
+++ trunk/ippdb/src/ippdb.c	(revision 17872)
@@ -262,5 +262,5 @@
 static void pzDataStoreRowFree(pzDataStoreRow *object);
 
-pzDataStoreRow *pzDataStoreRowAlloc(const char *camera, const char *telescope, const char *uri)
+pzDataStoreRow *pzDataStoreRowAlloc(const char *camera, const char *telescope, const char *uri, psTime* epoch)
 {
     pzDataStoreRow  *_object;
@@ -272,4 +272,5 @@
     _object->telescope = psStringCopy(telescope);
     _object->uri = psStringCopy(uri);
+    _object->epoch = psTimeCopy(epoch);
 
     return _object;
@@ -281,4 +282,5 @@
     psFree(object->telescope);
     psFree(object->uri);
+    psFree(object->epoch);
 }
 
@@ -301,4 +303,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, NULL)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, PZDATASTORE_TABLE_NAME, md);
@@ -314,5 +321,5 @@
 }
 
-bool pzDataStoreInsert(psDB * dbh, const char *camera, const char *telescope, const char *uri)
+bool pzDataStoreInsert(psDB * dbh, const char *camera, const char *telescope, const char *uri, psTime* epoch)
 {
     psMetadata *md = psMetadataAlloc();
@@ -329,4 +336,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item uri");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
         psFree(md);
         return false;
@@ -355,5 +367,5 @@
 bool pzDataStoreInsertObject(psDB *dbh, pzDataStoreRow *object)
 {
-    return pzDataStoreInsert(dbh, object->camera, object->telescope, object->uri);
+    return pzDataStoreInsert(dbh, object->camera, object->telescope, object->uri, object->epoch);
 }
 
@@ -443,4 +455,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, object->epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
 
@@ -467,6 +484,11 @@
         return false;
     }
-
-    return pzDataStoreRowAlloc(camera, telescope, uri);
+    psTime* epoch = psMetadataLookupPtr(&status, md, "epoch");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item epoch");
+        return false;
+    }
+
+    return pzDataStoreRowAlloc(camera, telescope, uri, epoch);
 }
 psArray *pzDataStoreSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -586,5 +608,5 @@
 static void summitExpRowFree(summitExpRow *object);
 
-summitExpRow *summitExpRowAlloc(const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_type, const char *uri, psS32 imfiles, psS16 fault)
+summitExpRow *summitExpRowAlloc(const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_type, const char *uri, psS32 imfiles, psS16 fault, psTime* epoch)
 {
     summitExpRow    *_object;
@@ -601,4 +623,5 @@
     _object->imfiles = imfiles;
     _object->fault = fault;
+    _object->epoch = psTimeCopy(epoch);
 
     return _object;
@@ -613,4 +636,5 @@
     psFree(object->exp_type);
     psFree(object->uri);
+    psFree(object->epoch);
 }
 
@@ -658,4 +682,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, NULL)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, SUMMITEXP_TABLE_NAME, md);
@@ -671,5 +700,5 @@
 }
 
-bool summitExpInsert(psDB * dbh, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_type, const char *uri, psS32 imfiles, psS16 fault)
+bool summitExpInsert(psDB * dbh, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_type, const char *uri, psS32 imfiles, psS16 fault, psTime* epoch)
 {
     psMetadata *md = psMetadataAlloc();
@@ -711,4 +740,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
         psFree(md);
         return false;
@@ -737,5 +771,5 @@
 bool summitExpInsertObject(psDB *dbh, summitExpRow *object)
 {
-    return summitExpInsert(dbh, object->exp_name, object->camera, object->telescope, object->dateobs, object->exp_type, object->uri, object->imfiles, object->fault);
+    return summitExpInsert(dbh, object->exp_name, object->camera, object->telescope, object->dateobs, object->exp_type, object->uri, object->imfiles, object->fault, object->epoch);
 }
 
@@ -850,4 +884,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, object->epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
 
@@ -899,6 +938,11 @@
         return false;
     }
-
-    return summitExpRowAlloc(exp_name, camera, telescope, dateobs, exp_type, uri, imfiles, fault);
+    psTime* epoch = psMetadataLookupPtr(&status, md, "epoch");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item epoch");
+        return false;
+    }
+
+    return summitExpRowAlloc(exp_name, camera, telescope, dateobs, exp_type, uri, imfiles, fault, epoch);
 }
 psArray *summitExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -1018,5 +1062,5 @@
 static void summitImfileRowFree(summitImfileRow *object);
 
-summitImfileRow *summitImfileRowAlloc(const char *exp_name, const char *camera, const char *telescope, const char *file_id, psS32 bytes, const char *md5sum, const char *class, const char *class_id, const char *uri)
+summitImfileRow *summitImfileRowAlloc(const char *exp_name, const char *camera, const char *telescope, const char *file_id, psS32 bytes, const char *md5sum, const char *class, const char *class_id, const char *uri, psTime* epoch)
 {
     summitImfileRow *_object;
@@ -1034,4 +1078,5 @@
     _object->class_id = psStringCopy(class_id);
     _object->uri = psStringCopy(uri);
+    _object->epoch = psTimeCopy(epoch);
 
     return _object;
@@ -1048,4 +1093,5 @@
     psFree(object->class_id);
     psFree(object->uri);
+    psFree(object->epoch);
 }
 
@@ -1098,4 +1144,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, NULL)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, SUMMITIMFILE_TABLE_NAME, md);
@@ -1111,5 +1162,5 @@
 }
 
-bool summitImfileInsert(psDB * dbh, const char *exp_name, const char *camera, const char *telescope, const char *file_id, psS32 bytes, const char *md5sum, const char *class, const char *class_id, const char *uri)
+bool summitImfileInsert(psDB * dbh, const char *exp_name, const char *camera, const char *telescope, const char *file_id, psS32 bytes, const char *md5sum, const char *class, const char *class_id, const char *uri, psTime* epoch)
 {
     psMetadata *md = psMetadataAlloc();
@@ -1156,4 +1207,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item uri");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
         psFree(md);
         return false;
@@ -1182,5 +1238,5 @@
 bool summitImfileInsertObject(psDB *dbh, summitImfileRow *object)
 {
-    return summitImfileInsert(dbh, object->exp_name, object->camera, object->telescope, object->file_id, object->bytes, object->md5sum, object->class, object->class_id, object->uri);
+    return summitImfileInsert(dbh, object->exp_name, object->camera, object->telescope, object->file_id, object->bytes, object->md5sum, object->class, object->class_id, object->uri, object->epoch);
 }
 
@@ -1300,4 +1356,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, object->epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
 
@@ -1354,6 +1415,11 @@
         return false;
     }
-
-    return summitImfileRowAlloc(exp_name, camera, telescope, file_id, bytes, md5sum, class, class_id, uri);
+    psTime* epoch = psMetadataLookupPtr(&status, md, "epoch");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item epoch");
+        return false;
+    }
+
+    return summitImfileRowAlloc(exp_name, camera, telescope, file_id, bytes, md5sum, class, class_id, uri, epoch);
 }
 psArray *summitImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -1473,5 +1539,5 @@
 static void pzDownloadExpRowFree(pzDownloadExpRow *object);
 
-pzDownloadExpRow *pzDownloadExpRowAlloc(const char *exp_name, const char *camera, const char *telescope, const char *state)
+pzDownloadExpRow *pzDownloadExpRowAlloc(const char *exp_name, const char *camera, const char *telescope, const char *state, psTime* epoch)
 {
     pzDownloadExpRow *_object;
@@ -1484,4 +1550,5 @@
     _object->telescope = psStringCopy(telescope);
     _object->state = psStringCopy(state);
+    _object->epoch = psTimeCopy(epoch);
 
     return _object;
@@ -1494,4 +1561,5 @@
     psFree(object->telescope);
     psFree(object->state);
+    psFree(object->epoch);
 }
 
@@ -1519,4 +1587,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, NULL)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, PZDOWNLOADEXP_TABLE_NAME, md);
@@ -1532,5 +1605,5 @@
 }
 
-bool pzDownloadExpInsert(psDB * dbh, const char *exp_name, const char *camera, const char *telescope, const char *state)
+bool pzDownloadExpInsert(psDB * dbh, const char *exp_name, const char *camera, const char *telescope, const char *state, psTime* epoch)
 {
     psMetadata *md = psMetadataAlloc();
@@ -1552,4 +1625,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, NULL, state)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item state");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
         psFree(md);
         return false;
@@ -1578,5 +1656,5 @@
 bool pzDownloadExpInsertObject(psDB *dbh, pzDownloadExpRow *object)
 {
-    return pzDownloadExpInsert(dbh, object->exp_name, object->camera, object->telescope, object->state);
+    return pzDownloadExpInsert(dbh, object->exp_name, object->camera, object->telescope, object->state, object->epoch);
 }
 
@@ -1671,4 +1749,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, object->epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
 
@@ -1700,6 +1783,11 @@
         return false;
     }
-
-    return pzDownloadExpRowAlloc(exp_name, camera, telescope, state);
+    psTime* epoch = psMetadataLookupPtr(&status, md, "epoch");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item epoch");
+        return false;
+    }
+
+    return pzDownloadExpRowAlloc(exp_name, camera, telescope, state, epoch);
 }
 psArray *pzDownloadExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -1819,5 +1907,5 @@
 static void pzDownloadImfileRowFree(pzDownloadImfileRow *object);
 
-pzDownloadImfileRow *pzDownloadImfileRowAlloc(const char *exp_name, const char *camera, const char *telescope, const char *class, const char *class_id, const char *uri, psS16 fault)
+pzDownloadImfileRow *pzDownloadImfileRowAlloc(const char *exp_name, const char *camera, const char *telescope, const char *class, const char *class_id, const char *uri, psS16 fault, psTime* epoch)
 {
     pzDownloadImfileRow *_object;
@@ -1833,4 +1921,5 @@
     _object->uri = psStringCopy(uri);
     _object->fault = fault;
+    _object->epoch = psTimeCopy(epoch);
 
     return _object;
@@ -1845,4 +1934,5 @@
     psFree(object->class_id);
     psFree(object->uri);
+    psFree(object->epoch);
 }
 
@@ -1885,4 +1975,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, NULL)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, PZDOWNLOADIMFILE_TABLE_NAME, md);
@@ -1898,5 +1993,5 @@
 }
 
-bool pzDownloadImfileInsert(psDB * dbh, const char *exp_name, const char *camera, const char *telescope, const char *class, const char *class_id, const char *uri, psS16 fault)
+bool pzDownloadImfileInsert(psDB * dbh, const char *exp_name, const char *camera, const char *telescope, const char *class, const char *class_id, const char *uri, psS16 fault, psTime* epoch)
 {
     psMetadata *md = psMetadataAlloc();
@@ -1933,4 +2028,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
         psFree(md);
         return false;
@@ -1959,5 +2059,5 @@
 bool pzDownloadImfileInsertObject(psDB *dbh, pzDownloadImfileRow *object)
 {
-    return pzDownloadImfileInsert(dbh, object->exp_name, object->camera, object->telescope, object->class, object->class_id, object->uri, object->fault);
+    return pzDownloadImfileInsert(dbh, object->exp_name, object->camera, object->telescope, object->class, object->class_id, object->uri, object->fault, object->epoch);
 }
 
@@ -2067,4 +2167,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, object->epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
 
@@ -2111,6 +2216,11 @@
         return false;
     }
-
-    return pzDownloadImfileRowAlloc(exp_name, camera, telescope, class, class_id, uri, fault);
+    psTime* epoch = psMetadataLookupPtr(&status, md, "epoch");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item epoch");
+        return false;
+    }
+
+    return pzDownloadImfileRowAlloc(exp_name, camera, telescope, class, class_id, uri, fault, epoch);
 }
 psArray *pzDownloadImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -2230,5 +2340,5 @@
 static void newExpRowFree(newExpRow *object);
 
-newExpRow *newExpRowAlloc(psS64 exp_id, const char *tmp_exp_name, const char *tmp_camera, const char *tmp_telescope, const char *state, const char *workdir, const char *workdir_state, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *label)
+newExpRow *newExpRowAlloc(psS64 exp_id, const char *tmp_exp_name, const char *tmp_camera, const char *tmp_telescope, const char *state, const char *workdir, const char *workdir_state, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *label, psTime* epoch)
 {
     newExpRow       *_object;
@@ -2249,4 +2359,5 @@
     _object->end_stage = psStringCopy(end_stage);
     _object->label = psStringCopy(label);
+    _object->epoch = psTimeCopy(epoch);
 
     return _object;
@@ -2266,4 +2377,5 @@
     psFree(object->end_stage);
     psFree(object->label);
+    psFree(object->epoch);
 }
 
@@ -2331,4 +2443,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, NULL)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, NEWEXP_TABLE_NAME, md);
@@ -2344,5 +2461,5 @@
 }
 
-bool newExpInsert(psDB * dbh, psS64 exp_id, const char *tmp_exp_name, const char *tmp_camera, const char *tmp_telescope, const char *state, const char *workdir, const char *workdir_state, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *label)
+bool newExpInsert(psDB * dbh, psS64 exp_id, const char *tmp_exp_name, const char *tmp_camera, const char *tmp_telescope, const char *state, const char *workdir, const char *workdir_state, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *label, psTime* epoch)
 {
     psMetadata *md = psMetadataAlloc();
@@ -2404,4 +2521,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, label)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item label");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
         psFree(md);
         return false;
@@ -2430,5 +2552,5 @@
 bool newExpInsertObject(psDB *dbh, newExpRow *object)
 {
-    return newExpInsert(dbh, object->exp_id, object->tmp_exp_name, object->tmp_camera, object->tmp_telescope, object->state, object->workdir, object->workdir_state, object->reduction, object->dvodb, object->tess_id, object->end_stage, object->label);
+    return newExpInsert(dbh, object->exp_id, object->tmp_exp_name, object->tmp_camera, object->tmp_telescope, object->state, object->workdir, object->workdir_state, object->reduction, object->dvodb, object->tess_id, object->end_stage, object->label, object->epoch);
 }
 
@@ -2563,4 +2685,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, object->epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
 
@@ -2632,6 +2759,11 @@
         return false;
     }
-
-    return newExpRowAlloc(exp_id, tmp_exp_name, tmp_camera, tmp_telescope, state, workdir, workdir_state, reduction, dvodb, tess_id, end_stage, label);
+    psTime* epoch = psMetadataLookupPtr(&status, md, "epoch");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item epoch");
+        return false;
+    }
+
+    return newExpRowAlloc(exp_id, tmp_exp_name, tmp_camera, tmp_telescope, state, workdir, workdir_state, reduction, dvodb, tess_id, end_stage, label, epoch);
 }
 psArray *newExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -2751,5 +2883,5 @@
 static void newImfileRowFree(newImfileRow *object);
 
-newImfileRow *newImfileRowAlloc(psS64 exp_id, const char *tmp_class_id, const char *uri)
+newImfileRow *newImfileRowAlloc(psS64 exp_id, const char *tmp_class_id, const char *uri, psTime* epoch)
 {
     newImfileRow    *_object;
@@ -2761,4 +2893,5 @@
     _object->tmp_class_id = psStringCopy(tmp_class_id);
     _object->uri = psStringCopy(uri);
+    _object->epoch = psTimeCopy(epoch);
 
     return _object;
@@ -2769,4 +2902,5 @@
     psFree(object->tmp_class_id);
     psFree(object->uri);
+    psFree(object->epoch);
 }
 
@@ -2789,4 +2923,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, NULL)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, NEWIMFILE_TABLE_NAME, md);
@@ -2802,5 +2941,5 @@
 }
 
-bool newImfileInsert(psDB * dbh, psS64 exp_id, const char *tmp_class_id, const char *uri)
+bool newImfileInsert(psDB * dbh, psS64 exp_id, const char *tmp_class_id, const char *uri, psTime* epoch)
 {
     psMetadata *md = psMetadataAlloc();
@@ -2817,4 +2956,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, uri)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item uri");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
         psFree(md);
         return false;
@@ -2843,5 +2987,5 @@
 bool newImfileInsertObject(psDB *dbh, newImfileRow *object)
 {
-    return newImfileInsert(dbh, object->exp_id, object->tmp_class_id, object->uri);
+    return newImfileInsert(dbh, object->exp_id, object->tmp_class_id, object->uri, object->epoch);
 }
 
@@ -2931,4 +3075,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, object->epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
 
@@ -2955,6 +3104,11 @@
         return false;
     }
-
-    return newImfileRowAlloc(exp_id, tmp_class_id, uri);
+    psTime* epoch = psMetadataLookupPtr(&status, md, "epoch");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item epoch");
+        return false;
+    }
+
+    return newImfileRowAlloc(exp_id, tmp_class_id, uri, epoch);
 }
 psArray *newImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -3074,5 +3228,5 @@
 static void rawExpRowFree(rawExpRow *object);
 
-rawExpRow *rawExpRowAlloc(psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_tag, const char *exp_type, const char *filelevel, const char *workdir, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 solang, const char *hostname, psS16 fault)
+rawExpRow *rawExpRowAlloc(psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_tag, const char *exp_type, const char *filelevel, const char *workdir, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 solang, const char *hostname, psS16 fault, psTime* epoch)
 {
     rawExpRow       *_object;
@@ -3138,4 +3292,5 @@
     _object->hostname = psStringCopy(hostname);
     _object->fault = fault;
+    _object->epoch = psTimeCopy(epoch);
 
     return _object;
@@ -3160,4 +3315,5 @@
     psFree(object->object);
     psFree(object->hostname);
+    psFree(object->epoch);
 }
 
@@ -3450,4 +3606,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, NULL)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, RAWEXP_TABLE_NAME, md);
@@ -3463,5 +3624,5 @@
 }
 
-bool rawExpInsert(psDB * dbh, psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_tag, const char *exp_type, const char *filelevel, const char *workdir, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 solang, const char *hostname, psS16 fault)
+bool rawExpInsert(psDB * dbh, psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_tag, const char *exp_type, const char *filelevel, const char *workdir, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 solang, const char *hostname, psS16 fault, psTime* epoch)
 {
     psMetadata *md = psMetadataAlloc();
@@ -3748,4 +3909,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
         psFree(md);
         return false;
@@ -3774,5 +3940,5 @@
 bool rawExpInsertObject(psDB *dbh, rawExpRow *object)
 {
-    return rawExpInsert(dbh, object->exp_id, object->exp_name, object->camera, object->telescope, object->dateobs, object->exp_tag, object->exp_type, object->filelevel, object->workdir, object->reduction, object->dvodb, object->tess_id, object->end_stage, object->filter, object->comment, object->airmass, object->ra, object->decl, object->exp_time, object->sat_pixel_frac, object->bg, object->bg_stdev, object->bg_mean_stdev, object->alt, object->az, object->ccd_temp, object->posang, object->m1_x, object->m1_y, object->m1_z, object->m1_tip, object->m1_tilt, object->m2_x, object->m2_y, object->m2_z, object->m2_tip, object->m2_tilt, object->env_temperature, object->env_humidity, object->env_wind_speed, object->env_wind_dir, object->teltemp_m1, object->teltemp_m1cell, object->teltemp_m2, object->teltemp_spider, object->teltemp_truss, object->teltemp_extra, object->pon_time, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->object, object->solang, object->hostname, object->fault);
+    return rawExpInsert(dbh, object->exp_id, object->exp_name, object->camera, object->telescope, object->dateobs, object->exp_tag, object->exp_type, object->filelevel, object->workdir, object->reduction, object->dvodb, object->tess_id, object->end_stage, object->filter, object->comment, object->airmass, object->ra, object->decl, object->exp_time, object->sat_pixel_frac, object->bg, object->bg_stdev, object->bg_mean_stdev, object->alt, object->az, object->ccd_temp, object->posang, object->m1_x, object->m1_y, object->m1_z, object->m1_tip, object->m1_tilt, object->m2_x, object->m2_y, object->m2_z, object->m2_tip, object->m2_tilt, object->env_temperature, object->env_humidity, object->env_wind_speed, object->env_wind_dir, object->teltemp_m1, object->teltemp_m1cell, object->teltemp_m2, object->teltemp_spider, object->teltemp_truss, object->teltemp_extra, object->pon_time, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->object, object->solang, object->hostname, object->fault, object->epoch);
 }
 
@@ -4132,4 +4298,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, object->epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
 
@@ -4426,6 +4597,11 @@
         return false;
     }
-
-    return rawExpRowAlloc(exp_id, exp_name, camera, telescope, dateobs, exp_tag, exp_type, filelevel, workdir, reduction, dvodb, tess_id, end_stage, filter, comment, airmass, ra, decl, exp_time, sat_pixel_frac, bg, bg_stdev, bg_mean_stdev, alt, az, ccd_temp, posang, m1_x, m1_y, m1_z, m1_tip, m1_tilt, m2_x, m2_y, m2_z, m2_tip, m2_tilt, env_temperature, env_humidity, env_wind_speed, env_wind_dir, teltemp_m1, teltemp_m1cell, teltemp_m2, teltemp_spider, teltemp_truss, teltemp_extra, pon_time, user_1, user_2, user_3, user_4, user_5, object, solang, hostname, fault);
+    psTime* epoch = psMetadataLookupPtr(&status, md, "epoch");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item epoch");
+        return false;
+    }
+
+    return rawExpRowAlloc(exp_id, exp_name, camera, telescope, dateobs, exp_tag, exp_type, filelevel, workdir, reduction, dvodb, tess_id, end_stage, filter, comment, airmass, ra, decl, exp_time, sat_pixel_frac, bg, bg_stdev, bg_mean_stdev, alt, az, ccd_temp, posang, m1_x, m1_y, m1_z, m1_tip, m1_tilt, m2_x, m2_y, m2_z, m2_tip, m2_tilt, env_temperature, env_humidity, env_wind_speed, env_wind_dir, teltemp_m1, teltemp_m1cell, teltemp_m2, teltemp_spider, teltemp_truss, teltemp_extra, pon_time, user_1, user_2, user_3, user_4, user_5, object, solang, hostname, fault, epoch);
 }
 psArray *rawExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
@@ -4545,5 +4721,5 @@
 static void rawImfileRowFree(rawImfileRow *object);
 
-rawImfileRow *rawImfileRowAlloc(psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *tmp_class_id, const char *class_id, const char *uri, const char *exp_type, const char *filelevel, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, const char *hostname, psS16 fault)
+rawImfileRow *rawImfileRowAlloc(psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *tmp_class_id, const char *class_id, const char *uri, const char *exp_type, const char *filelevel, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, const char *hostname, psS16 fault, psTime* epoch)
 {
     rawImfileRow    *_object;
@@ -4605,4 +4781,5 @@
     _object->hostname = psStringCopy(hostname);
     _object->fault = fault;
+    _object->epoch = psTimeCopy(epoch);
 
     return _object;
@@ -4624,4 +4801,5 @@
     psFree(object->object);
     psFree(object->hostname);
+    psFree(object->epoch);
 }
 
@@ -4894,4 +5072,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, NULL)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
     bool status = psDBCreateTable(dbh, RAWIMFILE_TABLE_NAME, md);
@@ -4907,5 +5090,5 @@
 }
 
-bool rawImfileInsert(psDB * dbh, psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *tmp_class_id, const char *class_id, const char *uri, const char *exp_type, const char *filelevel, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, const char *hostname, psS16 fault)
+bool rawImfileInsert(psDB * dbh, psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *tmp_class_id, const char *class_id, const char *uri, const char *exp_type, const char *filelevel, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, const char *hostname, psS16 fault, psTime* epoch)
 {
     psMetadata *md = psMetadataAlloc();
@@ -5172,4 +5355,9 @@
     if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) {
         psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
+        psFree(md);
+        return false;
+    }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
         psFree(md);
         return false;
@@ -5198,5 +5386,5 @@
 bool rawImfileInsertObject(psDB *dbh, rawImfileRow *object)
 {
-    return rawImfileInsert(dbh, object->exp_id, object->exp_name, object->camera, object->telescope, object->dateobs, object->tmp_class_id, object->class_id, object->uri, object->exp_type, object->filelevel, object->filter, object->comment, object->airmass, object->ra, object->decl, object->exp_time, object->sat_pixel_frac, object->bg, object->bg_stdev, object->bg_mean_stdev, object->alt, object->az, object->ccd_temp, object->posang, object->m1_x, object->m1_y, object->m1_z, object->m1_tip, object->m1_tilt, object->m2_x, object->m2_y, object->m2_z, object->m2_tip, object->m2_tilt, object->env_temperature, object->env_humidity, object->env_wind_speed, object->env_wind_dir, object->teltemp_m1, object->teltemp_m1cell, object->teltemp_m2, object->teltemp_spider, object->teltemp_truss, object->teltemp_extra, object->pon_time, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->object, object->hostname, object->fault);
+    return rawImfileInsert(dbh, object->exp_id, object->exp_name, object->camera, object->telescope, object->dateobs, object->tmp_class_id, object->class_id, object->uri, object->exp_type, object->filelevel, object->filter, object->comment, object->airmass, object->ra, object->decl, object->exp_time, object->sat_pixel_frac, object->bg, object->bg_stdev, object->bg_mean_stdev, object->alt, object->az, object->ccd_temp, object->posang, object->m1_x, object->m1_y, object->m1_z, object->m1_tip, object->m1_tilt, object->m2_x, object->m2_y, object->m2_z, object->m2_tip, object->m2_tilt, object->env_temperature, object->env_humidity, object->env_wind_speed, object->env_wind_dir, object->teltemp_m1, object->teltemp_m1cell, object->teltemp_m2, object->teltemp_spider, object->teltemp_truss, object->teltemp_extra, object->pon_time, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->object, object->hostname, object->fault, object->epoch);
 }
 
@@ -5536,4 +5724,9 @@
         return false;
     }
+    if (!psMetadataAdd(md, PS_LIST_TAIL, "epoch", PS_DATA_TIME, NULL, object->epoch)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item epoch");
+        psFree(md);
+        return false;
+    }
 
 
@@ -5810,6 +6003,11 @@
         return false;
     }
-
-    return rawImfileRowAlloc(exp_id, exp_name, camera, telescope, dateobs, tmp_class_id, class_id, uri, exp_type, filelevel, filter, comment, airmass, ra, decl, exp_time, sat_pixel_frac, bg, bg_stdev, bg_mean_stdev, alt, az, ccd_temp, posang, m1_x, m1_y, m1_z, m1_tip, m1_tilt, m2_x, m2_y, m2_z, m2_tip, m2_tilt, env_temperature, env_humidity, env_wind_speed, env_wind_dir, teltemp_m1, teltemp_m1cell, teltemp_m2, teltemp_spider, teltemp_truss, teltemp_extra, pon_time, user_1, user_2, user_3, user_4, user_5, object, hostname, fault);
+    psTime* epoch = psMetadataLookupPtr(&status, md, "epoch");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item epoch");
+        return false;
+    }
+
+    return rawImfileRowAlloc(exp_id, exp_name, camera, telescope, dateobs, tmp_class_id, class_id, uri, exp_type, filelevel, filter, comment, airmass, ra, decl, exp_time, sat_pixel_frac, bg, bg_stdev, bg_mean_stdev, alt, az, ccd_temp, posang, m1_x, m1_y, m1_z, m1_tip, m1_tilt, m2_x, m2_y, m2_z, m2_tip, m2_tilt, env_temperature, env_humidity, env_wind_speed, env_wind_dir, teltemp_m1, teltemp_m1cell, teltemp_m2, teltemp_spider, teltemp_truss, teltemp_extra, pon_time, user_1, user_2, user_3, user_4, user_5, object, hostname, fault, epoch);
 }
 psArray *rawImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
Index: trunk/ippdb/src/ippdb.h
===================================================================
--- trunk/ippdb/src/ippdb.h	(revision 17840)
+++ trunk/ippdb/src/ippdb.h	(revision 17872)
@@ -134,4 +134,5 @@
     char            *telescope;
     char            *uri;
+    psTime*         epoch;
 } pzDataStoreRow;
 
@@ -144,5 +145,6 @@
     const char      *camera,
     const char      *telescope,
-    const char      *uri
+    const char      *uri,
+    psTime*         epoch
 );
 
@@ -176,5 +178,6 @@
     const char      *camera,
     const char      *telescope,
-    const char      *uri
+    const char      *uri,
+    psTime*         epoch
 );
 
@@ -340,4 +343,5 @@
     psS32           imfiles;
     psS16           fault;
+    psTime*         epoch;
 } summitExpRow;
 
@@ -355,5 +359,6 @@
     const char      *uri,
     psS32           imfiles,
-    psS16           fault
+    psS16           fault,
+    psTime*         epoch
 );
 
@@ -392,5 +397,6 @@
     const char      *uri,
     psS32           imfiles,
-    psS16           fault
+    psS16           fault,
+    psTime*         epoch
 );
 
@@ -557,4 +563,5 @@
     char            *class_id;
     char            *uri;
+    psTime*         epoch;
 } summitImfileRow;
 
@@ -573,5 +580,6 @@
     const char      *class,
     const char      *class_id,
-    const char      *uri
+    const char      *uri,
+    psTime*         epoch
 );
 
@@ -611,5 +619,6 @@
     const char      *class,
     const char      *class_id,
-    const char      *uri
+    const char      *uri,
+    psTime*         epoch
 );
 
@@ -771,4 +780,5 @@
     char            *telescope;
     char            *state;
+    psTime*         epoch;
 } pzDownloadExpRow;
 
@@ -782,5 +792,6 @@
     const char      *camera,
     const char      *telescope,
-    const char      *state
+    const char      *state,
+    psTime*         epoch
 );
 
@@ -815,5 +826,6 @@
     const char      *camera,
     const char      *telescope,
-    const char      *state
+    const char      *state,
+    psTime*         epoch
 );
 
@@ -978,4 +990,5 @@
     char            *uri;
     psS16           fault;
+    psTime*         epoch;
 } pzDownloadImfileRow;
 
@@ -992,5 +1005,6 @@
     const char      *class_id,
     const char      *uri,
-    psS16           fault
+    psS16           fault,
+    psTime*         epoch
 );
 
@@ -1028,5 +1042,6 @@
     const char      *class_id,
     const char      *uri,
-    psS16           fault
+    psS16           fault,
+    psTime*         epoch
 );
 
@@ -1196,4 +1211,5 @@
     char            *end_stage;
     char            *label;
+    psTime*         epoch;
 } newExpRow;
 
@@ -1215,5 +1231,6 @@
     const char      *tess_id,
     const char      *end_stage,
-    const char      *label
+    const char      *label,
+    psTime*         epoch
 );
 
@@ -1256,5 +1273,6 @@
     const char      *tess_id,
     const char      *end_stage,
-    const char      *label
+    const char      *label,
+    psTime*         epoch
 );
 
@@ -1415,4 +1433,5 @@
     char            *tmp_class_id;
     char            *uri;
+    psTime*         epoch;
 } newImfileRow;
 
@@ -1425,5 +1444,6 @@
     psS64           exp_id,
     const char      *tmp_class_id,
-    const char      *uri
+    const char      *uri,
+    psTime*         epoch
 );
 
@@ -1457,5 +1477,6 @@
     psS64           exp_id,
     const char      *tmp_class_id,
-    const char      *uri
+    const char      *uri,
+    psTime*         epoch
 );
 
@@ -1670,4 +1691,5 @@
     char            *hostname;
     psS16           fault;
+    psTime*         epoch;
 } rawExpRow;
 
@@ -1734,5 +1756,6 @@
     psF32           solang,
     const char      *hostname,
-    psS16           fault
+    psS16           fault,
+    psTime*         epoch
 );
 
@@ -1820,5 +1843,6 @@
     psF32           solang,
     const char      *hostname,
-    psS16           fault
+    psS16           fault,
+    psTime*         epoch
 );
 
@@ -2029,4 +2053,5 @@
     char            *hostname;
     psS16           fault;
+    psTime*         epoch;
 } rawImfileRow;
 
@@ -2089,5 +2114,6 @@
     const char      *object,
     const char      *hostname,
-    psS16           fault
+    psS16           fault,
+    psTime*         epoch
 );
 
@@ -2171,5 +2197,6 @@
     const char      *object,
     const char      *hostname,
-    psS16           fault
+    psS16           fault,
+    psTime*         epoch
 );
 
Index: trunk/ippdb/tests/alloc.c
===================================================================
--- trunk/ippdb/tests/alloc.c	(revision 17840)
+++ trunk/ippdb/tests/alloc.c	(revision 17872)
@@ -11,5 +11,5 @@
         pzDataStoreRow  *object;
 
-        object = pzDataStoreRowAlloc("a string", "a string", "a string"    );
+        object = pzDataStoreRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z"    );
 
         if (!object) {
@@ -29,4 +29,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -36,5 +39,5 @@
         summitExpRow    *object;
 
-        object = summitExpRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", -32, -16    );
+        object = summitExpRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", -32, -16, "0001-01-01T00:00:00Z"    );
 
         if (!object) {
@@ -73,4 +76,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -80,5 +86,5 @@
         summitImfileRow *object;
 
-        object = summitImfileRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string"    );
+        object = summitImfileRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z"    );
 
         if (!object) {
@@ -122,4 +128,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -129,5 +138,5 @@
         pzDownloadExpRow *object;
 
-        object = pzDownloadExpRowAlloc("a string", "a string", "a string", "a string"    );
+        object = pzDownloadExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z"    );
 
         if (!object) {
@@ -151,4 +160,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -158,5 +170,5 @@
         pzDownloadImfileRow *object;
 
-        object = pzDownloadImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", -16    );
+        object = pzDownloadImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", -16, "0001-01-01T00:00:00Z"    );
 
         if (!object) {
@@ -192,4 +204,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -199,5 +214,5 @@
         newExpRow       *object;
 
-        object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string"    );
+        object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z"    );
 
         if (!object) {
@@ -253,4 +268,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -260,5 +278,5 @@
         newImfileRow    *object;
 
-        object = newImfileRowAlloc(-64, "a string", "a string"    );
+        object = newImfileRowAlloc(-64, "a string", "a string", "0001-01-01T00:00:00Z"    );
 
         if (!object) {
@@ -278,4 +296,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -285,5 +306,5 @@
         rawExpRow       *object;
 
-        object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, "a string", -16    );
+        object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, "a string", -16, "0001-01-01T00:00:00Z"    );
 
         if (!object) {
@@ -518,4 +539,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(object);
@@ -525,5 +549,5 @@
         rawImfileRow    *object;
 
-        object = rawImfileRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16    );
+        object = rawImfileRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16, "0001-01-01T00:00:00Z"    );
 
         if (!object) {
@@ -739,4 +763,7 @@
         }
         if (!object->fault == -16) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/insert.c
===================================================================
--- trunk/ippdb/tests/insert.c	(revision 17840)
+++ trunk/ippdb/tests/insert.c	(revision 17872)
@@ -13,125 +13,125 @@
         }
 
-        if (!pzDataStoreInsert(dbh, "a string", "a string", "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!summitExpInsert(dbh, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", -32, -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!summitImfileInsert(dbh, "a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!pzDownloadExpInsert(dbh, "a string", "a string", "a string", "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!pzDownloadImfileInsert(dbh, "a string", "a string", "a string", "a string", "a string", "a string", -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!newExpInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!newImfileInsert(dbh, -64, "a string", "a string")) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!rawExpInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, "a string", -16)) {
-            exit(EXIT_FAILURE);
-        }
-
-        psDBCleanup(dbh);
-    }
-
-    {
-        psDB            *dbh;
-
-        dbh = psDBInit("localhost", "test", NULL, "test");
-        if (!dbh) {
-            exit(EXIT_FAILURE);
-        }
-
-        if (!rawImfileInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16)) {
+        if (!pzDataStoreInsert(dbh, "a string", "a string", "a string", "0001-01-01T00:00:00Z")) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!summitExpInsert(dbh, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", -32, -16, "0001-01-01T00:00:00Z")) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!summitImfileInsert(dbh, "a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z")) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!pzDownloadExpInsert(dbh, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z")) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!pzDownloadImfileInsert(dbh, "a string", "a string", "a string", "a string", "a string", "a string", -16, "0001-01-01T00:00:00Z")) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!newExpInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z")) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!newImfileInsert(dbh, -64, "a string", "a string", "0001-01-01T00:00:00Z")) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!rawExpInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, "a string", -16, "0001-01-01T00:00:00Z")) {
+            exit(EXIT_FAILURE);
+        }
+
+        psDBCleanup(dbh);
+    }
+
+    {
+        psDB            *dbh;
+
+        dbh = psDBInit("localhost", "test", NULL, "test");
+        if (!dbh) {
+            exit(EXIT_FAILURE);
+        }
+
+        if (!rawImfileInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16, "0001-01-01T00:00:00Z")) {
             exit(EXIT_FAILURE);
         }
Index: trunk/ippdb/tests/insertobject.c
===================================================================
--- trunk/ippdb/tests/insertobject.c	(revision 17840)
+++ trunk/ippdb/tests/insertobject.c	(revision 17872)
@@ -14,5 +14,5 @@
         }
 
-        object = pzDataStoreRowAlloc("a string", "a string", "a string");
+        object = pzDataStoreRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -36,5 +36,5 @@
         }
 
-        object = summitExpRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", -32, -16);
+        object = summitExpRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", -32, -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -58,5 +58,5 @@
         }
 
-        object = summitImfileRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string");
+        object = summitImfileRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -80,5 +80,5 @@
         }
 
-        object = pzDownloadExpRowAlloc("a string", "a string", "a string", "a string");
+        object = pzDownloadExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -102,5 +102,5 @@
         }
 
-        object = pzDownloadImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", -16);
+        object = pzDownloadImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -124,5 +124,5 @@
         }
 
-        object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string");
+        object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -146,5 +146,5 @@
         }
 
-        object = newImfileRowAlloc(-64, "a string", "a string");
+        object = newImfileRowAlloc(-64, "a string", "a string", "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -168,5 +168,5 @@
         }
 
-        object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, "a string", -16);
+        object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, "a string", -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -190,5 +190,5 @@
         }
 
-        object = rawImfileRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
+        object = rawImfileRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
Index: trunk/ippdb/tests/metadatafromobject.c
===================================================================
--- trunk/ippdb/tests/metadatafromobject.c	(revision 17840)
+++ trunk/ippdb/tests/metadatafromobject.c	(revision 17872)
@@ -13,5 +13,5 @@
         bool            status;
 
-        object = pzDataStoreRowAlloc("a string", "a string", "a string");
+        object = pzDataStoreRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -37,4 +37,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -46,5 +49,5 @@
         bool            status;
 
-        object = summitExpRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", -32, -16);
+        object = summitExpRowAlloc("a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", -32, -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -88,4 +91,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -97,5 +103,5 @@
         bool            status;
 
-        object = summitImfileRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string");
+        object = summitImfileRowAlloc("a string", "a string", "a string", "a string", -32, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -145,4 +151,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -154,5 +163,5 @@
         bool            status;
 
-        object = pzDownloadExpRowAlloc("a string", "a string", "a string", "a string");
+        object = pzDownloadExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -182,4 +191,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -191,5 +203,5 @@
         bool            status;
 
-        object = pzDownloadImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", -16);
+        object = pzDownloadImfileRowAlloc("a string", "a string", "a string", "a string", "a string", "a string", -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -230,4 +242,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -239,5 +254,5 @@
         bool            status;
 
-        object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string");
+        object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -298,4 +313,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -307,5 +325,5 @@
         bool            status;
 
-        object = newImfileRowAlloc(-64, "a string", "a string");
+        object = newImfileRowAlloc(-64, "a string", "a string", "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -330,4 +348,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -339,5 +360,5 @@
         bool            status;
 
-        object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, "a string", -16);
+        object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, "a string", -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -576,4 +597,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         psFree(md);
@@ -585,5 +609,5 @@
         bool            status;
 
-        object = rawImfileRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16);
+        object = rawImfileRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", "a string", -16, "0001-01-01T00:00:00Z");
         if (!object) {
             exit(EXIT_FAILURE);
@@ -800,4 +824,7 @@
         }
         if (strncmp(psMetadataLookupPtr(&status, md, "hostname"), "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 17840)
+++ trunk/ippdb/tests/objectfrommetadata.c	(revision 17872)
@@ -25,4 +25,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = pzDataStoreObjectFromMetadata(md);
@@ -43,4 +46,7 @@
         }
         if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -85,4 +91,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = summitExpObjectFromMetadata(md);
@@ -118,4 +127,7 @@
         }
         if (!object->imfiles == -32) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -169,4 +181,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = summitImfileObjectFromMetadata(md);
@@ -211,4 +226,7 @@
         }
         if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -239,4 +257,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = pzDownloadExpObjectFromMetadata(md);
@@ -261,4 +282,7 @@
         }
         if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -300,4 +324,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = pzDownloadImfileObjectFromMetadata(md);
@@ -330,4 +357,7 @@
         }
         if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -392,4 +422,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = newExpObjectFromMetadata(md);
@@ -445,4 +478,7 @@
         }
         if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -468,4 +504,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = newImfileObjectFromMetadata(md);
@@ -485,4 +524,7 @@
         }
         if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -722,4 +764,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = rawExpObjectFromMetadata(md);
@@ -950,4 +995,7 @@
         }
         if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
@@ -1174,4 +1222,7 @@
             exit(EXIT_FAILURE);
         }
+            psFree(md);
+            exit(EXIT_FAILURE);
+        }
 
         object = rawImfileObjectFromMetadata(md);
@@ -1386,4 +1437,7 @@
         }
         if (strncmp(object->hostname, "a string", MAX_STRING_LENGTH)) {
+            psFree(object);
+            exit(EXIT_FAILURE);
+        }
             psFree(object);
             exit(EXIT_FAILURE);
