Use dateutil.parser for parsing string formatted datetime