def _since_epoch(cdate):

    if len(cdate) < 29:  # somethings broken
        if len(cdate) < 5:
            return utc_now()

    cdate = cdate[5:] # assume short weekday, i.e. do not support obsolete RFC 1036 date format
    try:
        t = time.strptime(cdate, "%d-%b-%Y %H:%M:%S %Z")   # e.g. 18-Apr-2014 12:30:51 GMT
    except ValueError:
        try:
            t = time.strptime(cdate, "%d-%b-%y %H:%M:%S %Z")   # e.g. 18-Apr-14 12:30:51 GMT
        except ValueError:
            try:
                t = time.strptime(cdate, "%d %b %Y %H:%M:%S %Z")   # e.g. 18 Apr 2014 12:30:51 GMT
            except ValueError:
                raise Exception, 'ValueError: Date "{0}" does not match any of '.format(cdate) + \
                                 '"%d-%b-%Y %H:%M:%S %Z", ' + \
                                 '"%d-%b-%y %H:%M:%S %Z", ' + \
                                 '"%d %b %Y %H:%M:%S %Z".'
    #return int(time.mktime(t))
    return calendar.timegm(t)
Return a rectangle (height, width) with area N that is closest to square.
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pysaml2-2.4.0/src/saml2/httpbase.py/_since_epoch--crossover with--dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/packaged_dependencies/theano_linear/imaging.py/most_square_shape