Index: mapogcsos.c =================================================================== --- mapogcsos.c (revision 7727) +++ mapogcsos.c (working copy) @@ -1074,6 +1074,7 @@ char *pszReturn = NULL, *pszBegin = NULL, *pszEnd = NULL; CPLXMLNode *psRoot=NULL, *psChild=NULL; CPLXMLNode *psTime=NULL, *psBegin=NULL, *psEnd=NULL; + struct tm tm_struct; if (pszGmlTime) { @@ -1093,7 +1094,10 @@ { psTime = psChild->psNext; if (psTime && psTime->pszValue && psTime->eType == CXT_Text) - pszReturn = strdup(psTime->pszValue); + { + if (msParseTime(psTime->pszValue, &tm_struct) == MS_TRUE) + pszReturn = strdup(psTime->pszValue); + } } } else @@ -1115,9 +1119,13 @@ if (pszBegin && pszEnd) { - pszReturn = strdup(pszBegin); - pszReturn = msStringConcatenate(pszReturn, "/"); - pszReturn = msStringConcatenate(pszReturn, pszEnd); + if (msParseTime(pszBegin, &tm_struct) == MS_TRUE && + msParseTime(pszEnd, &tm_struct) == MS_TRUE) + { + pszReturn = strdup(pszBegin); + pszReturn = msStringConcatenate(pszReturn, "/"); + pszReturn = msStringConcatenate(pszReturn, pszEnd); + } } } }