[Mapbender-commits] r10361 - trunk/mapbender/tools

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Nov 28 23:37:41 PST 2019


Author: armin11
Date: 2019-11-28 23:37:41 -0800 (Thu, 28 Nov 2019)
New Revision: 10361

Modified:
   trunk/mapbender/tools/mod_qualifyPersistedMetadataXml.php
Log:
Set metadata date to now, if metadata was qualified afterwards

Modified: trunk/mapbender/tools/mod_qualifyPersistedMetadataXml.php
===================================================================
--- trunk/mapbender/tools/mod_qualifyPersistedMetadataXml.php	2019-11-29 07:36:45 UTC (rev 10360)
+++ trunk/mapbender/tools/mod_qualifyPersistedMetadataXml.php	2019-11-29 07:37:41 UTC (rev 10361)
@@ -222,9 +222,11 @@
 		//if keyword was injected - the metadata dateStamp has to be altered - fictive 1 day will be added to mark the difference!
 		$dateNodeList = $xpath->query('//gmd:MD_Metadata/gmd:dateStamp/gco:Date');
                 $dateStamp = $dateNodeList->item(0)->nodeValue;
-		$date = new DateTime($dateStamp);
+		//$date = new DateTime($dateStamp);
+                $date = new DateTime('NOW');
 	        //add one day
-		$date->add(new DateInterval('P1D'));
+		//$date->add(new DateInterval('P1D'));
+		$date = new DateTime('NOW');
 		$dateNew = date_format($date, 'Y-m-d');
                 $fragment = $metadataDomObject->createElementNS('http://www.isotc211.org/2005/gco', 'gco:Date', $dateNew);
 		$dateNodeList->item(0)->parentNode->replaceChild($fragment, $dateNodeList->item(0)); 



More information about the Mapbender_commits mailing list