Index: /trunk/psLib/src/types/psMetadataConfig.c
===================================================================
--- /trunk/psLib/src/types/psMetadataConfig.c	(revision 5012)
+++ /trunk/psLib/src/types/psMetadataConfig.c	(revision 5013)
@@ -10,6 +10,6 @@
 *  @author Eric Van Alst, MHPCC
 *
-*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-09-12 23:40:01 $
+*  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-09-13 01:04:39 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -250,4 +250,39 @@
 
     return value;
+}
+
+/** Returns a psTime structure */
+static psTime *parseTime(char *inString,
+                         psTimeType tt,
+                         psS32 *status)
+{
+    psTime *out;
+    long sec = 0;
+    unsigned int nsec = 0;
+    char *end = NULL;
+    out = psTimeAlloc(tt);
+
+    sec = strtol(inString, &end, 10);
+    out->sec = sec;
+    while (!strncmp(end, " ", 1))
+        end++;
+    inString = end;
+    nsec = (unsigned int)strtoul(inString, &end, 10);
+    out->nsec = nsec;
+    if (out->sec == 0 && out->nsec == 0)
+        *status = 1;
+    while (!strncmp(end, " ", 1))
+        end++;
+    inString = end;
+    if ( !strncmp(inString, "false", 10) || !strncmp(inString, "f", 10) ||
+            !strncmp(inString, "FALSE", 10) || !strncmp(inString, " F", 10) )
+        out->leapsecond = false;
+    else if ( !strncmp(inString, "true", 10) || !strncmp(inString, "t", 10) ||
+              !strncmp(inString, "TRUE", 10) || !strncmp(inString, "T", 10) )
+        out->leapsecond = true;
+    else {
+        *status = 1;
+    }
+    return out;
 }
 
@@ -717,4 +752,6 @@
     psMetadata*          tempMeta      = NULL;
     p_psParseLevelInfo*  nextLevelInfo = NULL;
+    psTime *mTime;
+    psTimeType timeType;
 
     // Get the metadata item type
@@ -774,4 +811,7 @@
         } else if(!strncmp(strType, "METADATA", 8)) {
             mdType = PS_META_META;
+        } else if( !strncmp(strType, "PS_TIME_UTC", 12) || !strncmp(strType, "PS_TIME_TAI", 12)
+                   || !strncmp(strType, "PS_TIME_UT1", 12) || !strncmp(strType, "PS_TIME_TT", 12)) {
+            mdType = PS_META_TIME;
         } else {
             // Search through user types
@@ -895,4 +935,25 @@
             returnValue = false;
         }
+        break;
+    case PS_META_TIME:
+        if( !strncmp(strType, "PS_TIME_UTC", 12) )
+            timeType = PS_TIME_UTC;
+        else if( !strncmp(strType, "PS_TIME_TAI", 12) )
+            timeType = PS_TIME_TAI;
+        else if( !strncmp(strType, "PS_TIME_UT1", 12) )
+            timeType = PS_TIME_UT1;
+        else if( !strncmp(strType, "PS_TIME_TT", 12) )
+            timeType = PS_TIME_TT;
+        mTime = parseTime(strValue, timeType, &status);
+        if(!status) {
+            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName,
+                                      mdType | flags,
+                                      strComment, mTime);
+        } else {
+            psError(PS_ERR_IO, true, PS_ERRORTEXT_psMetadataIO_PARSE_FAILED, strValue, keyName,
+                    strType, lineCount, fileName);
+            returnValue = false;
+        }
+        psFree(mTime);
         break;
     case PS_META_VEC:
Index: /trunk/psLib/test/types/verified/tst_psMetadataIO.stderr
===================================================================
--- /trunk/psLib/test/types/verified/tst_psMetadataIO.stderr	(revision 5012)
+++ /trunk/psLib/test/types/verified/tst_psMetadataIO.stderr	(revision 5013)
@@ -39,17 +39,17 @@
     Failed to parse the value 'ccdd' of metadata item value2, type S32, on line 21 of test2.config.
 <DATE><TIME>|<HOST>|E|parseLine (FILE:LINENO)
-    More than one '@' character not allowed.  Found on line 24 of test2.config.
+    More than one '@' character not allowed.  Found on line 27 of test2.config.
 <DATE><TIME>|<HOST>|E|parseLine (FILE:LINENO)
-    Failed to read a metadata type on line 27 of test2.config.
+    Failed to read a metadata type on line 30 of test2.config.
 <DATE><TIME>|<HOST>|E|parseLine (FILE:LINENO)
-    Specified type, CELL, on line 31 of test2.config is already defined.
+    Specified type, CELL, on line 34 of test2.config is already defined.
 <DATE><TIME>|<HOST>|E|psMetadataAddItem (FILE:LINENO)
     Duplicate metadata item name is not allowed.  Use a psMetadataFlags option to allow such action.
 <DATE><TIME>|<HOST>|E|parseLine (FILE:LINENO)
-    Metadata type 'NEWCELL', found on line 37 of test2.config, is invalid.
+    Metadata type 'NEWCELL', found on line 40 of test2.config, is invalid.
 <DATE><TIME>|<HOST>|E|parseMetadataItem (FILE:LINENO)
-    Failed to read a metadata OURCELL on line 40 of test2.config.
+    Failed to read a metadata OURCELL on line 43 of test2.config.
 <DATE><TIME>|<HOST>|E|parseLine (FILE:LINENO)
-    Metadata type 'NEWCELL1', found on line 43 of test2.config, is invalid.
+    Metadata type 'NEWCELL1', found on line 46 of test2.config, is invalid.
 <DATE><TIME>|<HOST>|I|testMetadataParseConfig1
     Following should generate error message
