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