Add configuration to indicate whether the time field in db is string type or not.
Then decide whether to parse date string or not before manipulate it as datetime.