public function toLdap($date)
{
if (!$date instanceof \DateTime) {
throw new AttributeConverterException('The datetime going to LDAP should be a DateTime object.');
}
return $date->format('YmdHis') . $this->getTzOffsetForTimestamp($date->format('P'));
}