whois/parser.py
changeset 42 d187963bb7e9
parent 41 8772587c32a5
child 43 f7bf8d6f0547
equal deleted inserted replaced
41:8772587c32a5 42:d187963bb7e9
    54 def cast_date(s):
    54 def cast_date(s):
    55     """Convert any date string found in WHOIS to a datetime object.
    55     """Convert any date string found in WHOIS to a datetime object.
    56     """
    56     """
    57     if DATEUTIL:
    57     if DATEUTIL:
    58         try:
    58         try:
    59             return dp.parse(s.strip(), tzinfos=tz_data)
    59             return dp.parse(s.strip(), tzinfos=tz_data).replace(tzinfo=None)
    60         except Exception:
    60         except Exception:
    61             return datetime_parse(s)
    61             return datetime_parse(s)
    62     else:
    62     else:
    63         return datetime_parse(s)
    63         return datetime_parse(s)
    64 
    64