[mapserver-commits] r9793 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue Feb 16 09:39:30 EST 2010


Author: assefa
Date: 2010-02-16 09:39:29 -0500 (Tue, 16 Feb 2010)
New Revision: 9793

Modified:
   trunk/mapserver/mapwfs.c
Log:
Generate timestamp for resulttype=hits #3309

Modified: trunk/mapserver/mapwfs.c
===================================================================
--- trunk/mapserver/mapwfs.c	2010-02-12 21:47:09 UTC (rev 9792)
+++ trunk/mapserver/mapwfs.c	2010-02-16 14:39:29 UTC (rev 9793)
@@ -1922,18 +1922,24 @@
 
       if(paramsObj->pszVersion && strncmp(paramsObj->pszVersion,"1.1",3) == 0 )
       {
-	  char timestring[100];
-	  struct tm *now;
-	  time_t tim=time(NULL);
+	  if (iResultTypeHits == 1)
+	  {
+	      char timestring[100];
+	      struct tm *now;
+	      time_t tim=time(NULL);
 	  
-	  now=localtime(&tim);
+	      now=localtime(&tim);
 
-	  sprintf(timestring, "%d-%02d-%02dT%02d:%02d:%02d",
-		  now->tm_year+1900, now->tm_mon+1, now->tm_mday,
-		  now->tm_hour, now->tm_min, now->tm_sec);
+	      sprintf(timestring, "%d-%02d-%02dT%02d:%02d:%02d",
+		      now->tm_year+1900, now->tm_mon+1, now->tm_mday,
+		      now->tm_hour, now->tm_min, now->tm_sec);
 
-	  msIO_printf("   xsi:schemaLocation=\"%s %sSERVICE=WFS&VERSION=%s&REQUEST=DescribeFeatureType&TYPENAME=%s&OUTPUTFORMAT=%s  http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd\" timeStamp=\"%s\" numberOfFeatures=\"%d\">\n",
-		      user_namespace_uri_encoded, script_url_encoded, encoded, encoded_typename, output_schema_format, timestring, iNumberOfFeatures);
+	      msIO_printf("   xsi:schemaLocation=\"%s %sSERVICE=WFS&VERSION=%s&REQUEST=DescribeFeatureType&TYPENAME=%s&OUTPUTFORMAT=%s  http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd\" timeStamp=\"%s\" numberOfFeatures=\"%d\">\n",
+			  user_namespace_uri_encoded, script_url_encoded, encoded, encoded_typename, output_schema_format, timestring, iNumberOfFeatures);
+	  }
+	  else
+	    msIO_printf("   xsi:schemaLocation=\"%s %sSERVICE=WFS&VERSION=%s&REQUEST=DescribeFeatureType&TYPENAME=%s&OUTPUTFORMAT=%s  http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd\">\n",
+			user_namespace_uri_encoded, script_url_encoded, encoded, encoded_typename, output_schema_format);
       }
       else
         msIO_printf("   xsi:schemaLocation=\"%s %sSERVICE=WFS&VERSION=%s&REQUEST=DescribeFeatureType&TYPENAME=%s&OUTPUTFORMAT=%s\">\n",



More information about the mapserver-commits mailing list