Illegal date/time is detected and reported properly

time like 3445, 1430pm, date like 32/10/2014, 12/13/2014, etc can be
detected and give errors instead of returning a null time