implement StrToTime