allow null values in date time helper
allow null values in date time helper

the datetime attributes tries to save null values in case there's no value.

public function saveValue($value) {
	if ($value != '') {
		$value = date('Y-m-d H:i:s', strtotime($value));
	} else {
		$value = null;
	}
	
	$db = Loader::db();
	$db->Replace('atDateTime', array('avID' => $this->getAttributeValueID(), 'value' => $value), 'avID', true);
}

however, saveValue is called by saveForm which has this code in it:

$dt = Loader::helper('form/date_time');
$value = $dt->translate('value', $data);

the translate method always tries to convert the value to a date, if if it's empty. This results in 1/1/1970
The date method in the helper also check for empty values with this === '' but when there's no date, it's not a string and therefore shows the current date. If we don't check the data type and only the value, the date_time attribute allows us to save and display empty dates.

Former-commit-id: 419eefb42d797484033b348f13d6957f641bde1b
hissy/concrete5,jaromirdalecky/concrete5,mlocati/concrete5,mlocati/concrete5,hissy/concrete5,acliss19xx/concrete5,biplobice/concrete5,MrKarlDilkington/concrete5,deek87/concrete5,biplobice/concrete5,concrete5/concrete5,MrKarlDilkington/concrete5,a3020/concrete5,haeflimi/concrete5,concrete5/concrete5,KorvinSzanto/concrete5,olsgreen/concrete5,KorvinSzanto/concrete5,biplobice/concrete5,triplei/concrete5-8,jaromirdalecky/concrete5,mainio/concrete5,deek87/concrete5,rikzuiderlicht/concrete5,concrete5/concrete5,deek87/concrete5,jaromirdalecky/concrete5,mainio/concrete5,KorvinSzanto/concrete5,mlocati/concrete5,a3020/concrete5,acliss19xx/concrete5,concrete5/concrete5,triplei/concrete5-8,olsgreen/concrete5,haeflimi/concrete5,triplei/concrete5-8,rikzuiderlicht/concrete5,hissy/concrete5,olsgreen/concrete5,hissy/concrete5,mainio/concrete5,acliss19xx/concrete5,rikzuiderlicht/concrete5,haeflimi/concrete5,deek87/concrete5,MrKarlDilkington/concrete5,haeflimi/concrete5,mlocati/concrete5,biplobice/concrete5,jaromirdalecky/concrete5