public static function durationToTime($duration)
    {
        $time = null;

        try {
            $interval = preg_match('/(\.[0-9]{1,6}S)$/', $duration)
                ? new DateIntervalMS($duration)
                : new DateInterval($duration);
            $time = self::intervalToTime($interval);
        } catch (Exception $e) {
            common_Logger::e($e->getMessage());
        }

        return $time;
    }
public static function durationToTime($duration)
    {
        $time = null;

        try {
            $interval = preg_match('/(\.[0-9]{1,6}S)$/', $duration)
                ? new DateIntervalMS($duration)
                : new DateInterval($duration);
            $time = self::intervalToTime($interval);
        } catch (Exception $e) {
            common_Logger::e($e->getMessage());
        }

        return $time;
    }
public static function durationToTime ( $ duration ) { $ time = null ; try { $ interval = preg_match ( '/(\.[0-9]{1,6}S)$/' , $ duration ) ? new DateIntervalMS ( $ duration ) : new DateInterval ( $ duration ) ; $ time = self :: intervalToTime ( $ interval ) ; } catch ( Exception $ e ) { common_Logger :: e ( $ e -> getMessage ( ) ) ; } return $ time ; }
Converts a duration to a time
@param string $duration the ISO duration
@return string time hh:mm:ss.micros
Converts a duration to a time