/** * Gets a LDAP date/time attribute. * * This is an offline method. * * @param string $name * @param integer $index * @return array|integer * @throws Zend_Ldap_Exception */ public function getDateTimeAttribute($name, $index = null) { return Zend_Ldap_Attribute::getDateTimeAttribute($this->_currentData, $name, $index); }
public function testGetDateTimeValueNegativeOffet2() { $data = array('ts' => array('20080612143045-0715')); $retTs = Zend_Ldap_Attribute::getDateTimeAttribute($data, 'ts', 0); $tsCompare = gmmktime(21, 45, 45, 6, 12, 2008); $this->assertEquals($tsCompare, $retTs); }