getFormat()); if (is_array($date)) { $retval[] = mktime( $date['tm_hour'], $date['tm_min'], $date['tm_sec'], $date['tm_mon']+1, $date['tm_mday'], $date['tm_year']+1900 ); } } return $retval; } /** * Return the value of the LDAP attribute after handling is LDAP type * * @param mixed $data The value of the attribute * * @return array The LDAP value of the attribute */ public function getUpdateData($data) { $retval = array(); foreach(ensureIsArray($data) as $val) { $retval[] = strftime($this -> getFormat(), $val); } return $retval; } /** * Return the storage format of the date (as accept by strptime()/strftime()) * * @return string the storage format of the date **/ public function getFormat() { return $this -> getConfig('ldap_options.format', "%Y%m%d%H%M%SZ", 'string'); } }