Merge pull request #1798 from julceslauhub/master

BUG 12098 Notices cuando se envian fechas con mascara Fecha Static Dates SHM IMPROVEMENT
This commit is contained in:
julceslauhub
2013-06-10 12:05:39 -07:00

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' : ''));
}
}