add * before strptime in if
delete ! before *strptime
added check input time