used datetime.datetime.strptime for correct conversion of str time to datetime represenation