src/LdapTools/Utilities/ADTimeSpan.php
protected function setValuesFromLdap($time)
    {
        if ($time == self::NEVER) {
            $this->setNever(true);
        } else {
            $seconds = $time / self::UNIT[self::SECONDS];

            $dtBase = new \DateTime('@0');
            $dtSeconds = new \DateTime('@' . $seconds);

            $this->setDays($dtBase->diff($dtSeconds)->format('%a'));
            $this->setHours($dtBase->diff($dtSeconds)->format('%h'));
            $this->setMinutes($dtBase->diff($dtSeconds)->format('%i'));
            $this->setSeconds($dtBase->diff($dtSeconds)->format('%s'));
        }
    }
protected function setValuesFromLdap($time)
    {
        if ($time == self::NEVER) {
            $this->setNever(true);
        } else {
            $seconds = $time / self::UNIT[self::SECONDS];

            $dtBase = new \DateTime('@0');
            $dtSeconds = new \DateTime('@' . $seconds);

            $this->setDays($dtBase->diff($dtSeconds)->format('%a'));
            $this->setHours($dtBase->diff($dtSeconds)->format('%h'));
            $this->setMinutes($dtBase->diff($dtSeconds)->format('%i'));
            $this->setSeconds($dtBase->diff($dtSeconds)->format('%s'));
        }
    }
protected function setValuesFromLdap ( $ time ) { if ( $ time == self :: NEVER ) { $ this -> setNever ( true ) ; } else { $ seconds = $ time / self :: UNIT [ self :: SECONDS ] ; $ dtBase = new \ DateTime ( '@0' ) ; $ dtSeconds = new \ DateTime ( '@' . $ seconds ) ; $ this -> setDays ( $ dtBase -> diff ( $ dtSeconds ) -> format ( '%a' ) ) ; $ this -> setHours ( $ dtBase -> diff ( $ dtSeconds ) -> format ( '%h' ) ) ; $ this -> setMinutes ( $ dtBase -> diff ( $ dtSeconds ) -> format ( '%i' ) ) ; $ this -> setSeconds ( $ dtBase -> diff ( $ dtSeconds ) -> format ( '%s' ) ) ; } }
Given a time format from LDAP break it down into its individual time units and set them.

@param int $time
Given a time format from LDAP break it down into its individual time units and set them .