def parse_time_string(arg, freq=None, dayfirst=None, yearfirst=None):
 from pandas.core.config import get_option
 if (not isinstance(arg, compat.string_types)):
  return arg
 from pandas.tseries.offsets import DateOffset
 if isinstance(freq, DateOffset):
  freq = freq.rule_code
 if (dayfirst is None):
  dayfirst = get_option('display.date_dayfirst')
 if (yearfirst is None):
  yearfirst = get_option('display.date_yearfirst')
 return tslib.parse_datetime_string_with_reso(arg, freq=freq, dayfirst=dayfirst, yearfirst=yearfirst)

def parse_time_string ( arg , freq = None , dayfirst = None , yearfirst = None ) : from pandas . core . config import get_option if ( not isinstance ( arg , compat . string_types ) ) : return arg from pandas . tseries . offsets import DateOffset if isinstance ( freq , DateOffset ) : freq = freq . rule_code if ( dayfirst is None ) : dayfirst = get_option ( 'display.date_dayfirst' ) if ( yearfirst is None ) : yearfirst = get_option ( 'display.date_yearfirst' ) return tslib . parse_datetime_string_with_reso ( arg , freq = freq , dayfirst = dayfirst , yearfirst = yearfirst )
try hard to parse datetime string .