public function setWith($value, $checkType = true)
{
$phpDate = \dateTime::createFromFormat(self::mysqlDateTimeFormat, $value);
if ($phpDate !== false) {
parent::setWith($phpDate, $checkType);
} else {
parent::setWith($value, false);
if ($checkType === true) {
$this->fail($this->_('%s is not in format Y-m-d H:i:s', $this));
}
}
return $this;
}