format("Y-m-d\TH:i:s")); } /* * @brief DDTime to ISO conversion */ public static function DDTimeToIso($DDTime) { $date = DateTime::createFromFormat('YzHisu', $DDTime); return $date->format("Y-m-d\TH:i:s"); } /* * @brief DDTime to ISO conversion */ public static function DDStartIntervalToStopIso($DDStart, $DDInterval) { $startStamp = self::DDTimeToTimeStamp($DDStart); $intStamp = self::DDTimeToTimeStamp($DDInterval); return date("Y-m-d\TH:i:s", $startStamp + $intStamp); } public static function rrmdir($dir) { if (is_dir($dir)) { $objects = scandir($dir); foreach ($objects as $object) { // Recursively delete a directory that is not empty and directorys in directory if ($object != "." && $object != "..") { // If object isn't a directory recall recursively this function if (filetype($dir."/".$object) == "dir") self::rrmdir($dir."/".$object); else unlink($dir."/".$object); } } reset($objects); rmdir($dir); } } } ?>