(ims)
Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.
Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch.
Parse rfc1123 rfc850 and asctime timestamps and return UTC epoch .
def parse_date(ims):
    """ Parse rfc1123, rfc850 and asctime timestamps and return UTC epoch. """
    try:
        ts = email.utils.parsedate_tz(ims)
        return time.mktime(ts[:8] + (0,)) - (ts[9] or 0) - time.timezone
    except (TypeError, ValueError, IndexError, OverflowError):
        return None
def parse_date ( ims ) : try : ts = email . utils . parsedate_tz ( ims ) return time . mktime ( ts [ : 8 ] + ( 0 , ) ) - ( ts [ 9 ] or 0 ) - time . timezone except ( TypeError , ValueError , IndexError , OverflowError ) : return None