BUG 12098 Notices cuando se envian fechas con mascara Fecha Static Dates SHM IMPROVEMENT

This commit is contained in:
Julio Cesar Laura
2013-06-10 15:02:23 -04:00
parent edf6b8e2c7
commit 2d75b9f8df

View File

@@ -4631,7 +4631,11 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
$ugly['tm_min'],
$ugly['tm_sec']
);
$new_schedule = new DateTime($ymd);
try {
$new_schedule = new DateTime($ymd);
} catch (Exception $error) {
$new_schedule = new DateTime();
}
return $new_schedule->format('Y-m-d' . ($withHours ? ' H:i:s' : ''));
}
}