plugin/scorm/Manager/ScormManager.php
private function retrieveIntervalFromSeconds($seconds)
    {
        $result = '';
        $remainingTime = (int) $seconds;

        if (empty($remainingTime)) {
            $result .= 'PT0S';
        } else {
            $nbDays = (int) ($remainingTime / 86400);
            $remainingTime %= 86400;
            $nbHours = (int) ($remainingTime / 3600);
            $remainingTime %= 3600;
            $nbMinutes = (int) ($remainingTime / 60);
            $nbSeconds = $remainingTime % 60;
            $result .= 'P'.$nbDays.'DT'.$nbHours.'H'.$nbMinutes.'M'.$nbSeconds.'S';
        }

        return $result;
    }
private function retrieveIntervalFromSeconds($seconds)
    {
        $result = '';
        $remainingTime = (int) $seconds;

        if (empty($remainingTime)) {
            $result .= 'PT0S';
        } else {
            $nbDays = (int) ($remainingTime / 86400);
            $remainingTime %= 86400;
            $nbHours = (int) ($remainingTime / 3600);
            $remainingTime %= 3600;
            $nbMinutes = (int) ($remainingTime / 60);
            $nbSeconds = $remainingTime % 60;
            $result .= 'P'.$nbDays.'DT'.$nbHours.'H'.$nbMinutes.'M'.$nbSeconds.'S';
        }

        return $result;
    }
private function retrieveIntervalFromSeconds ( $ seconds ) { $ result = '' ; $ remainingTime = ( int ) $ seconds ; if ( empty ( $ remainingTime ) ) { $ result .= 'PT0S' ; } else { $ nbDays = ( int ) ( $ remainingTime / 86400 ) ; $ remainingTime %= 86400 ; $ nbHours = ( int ) ( $ remainingTime / 3600 ) ; $ remainingTime %= 3600 ; $ nbMinutes = ( int ) ( $ remainingTime / 60 ) ; $ nbSeconds = $ remainingTime % 60 ; $ result .= 'P' . $ nbDays . 'DT' . $ nbHours . 'H' . $ nbMinutes . 'M' . $ nbSeconds . 'S' ; } return $ result ; }
Converts a time in seconds to a DateInterval string.

@param int $seconds

@return string
Converts a time in seconds to a DateInterval string .