/** * Checks if the attribute can be set and sets it accordingly. * * @param string $name * @param integer|array $value * @param boolean $utc * @param boolean $append * @throws Zend_Ldap_Exception */ protected function _setDateTimeAttribute($name, $value, $utc, $append) { $this->_assertChangeableAttribute($name); Zend_Ldap_Attribute::setDateTimeAttribute($this->_currentData, $name, $value, $utc, $append); }
public function testGetDateTimeValueFromArray() { $ts = array(); $ts[] = mktime(12, 30, 30, 6, 25, 2008); $ts[] = mktime(1, 25, 30, 1, 2, 2008); $data = array(); Zend_Ldap_Attribute::setDateTimeAttribute($data, 'ts', $ts, false); $this->_assertLocalDateTimeString($ts[0], $data['ts'][0]); $this->_assertLocalDateTimeString($ts[1], $data['ts'][1]); $retTs = Zend_Ldap_Attribute::getDateTimeAttribute($data, 'ts'); $this->assertEquals($ts[0], $retTs[0]); $this->assertEquals($ts[1], $retTs[1]); }