fix the date parsing code

also add a consistency check that cannot be directly used as the inputs
are not consistent, particularly with respect to leading zeroes in the
minutes so M-d-yyyy-h-m-ss-a works mostly, but not always
Make manual verification easier