def arl2time(YY, MM, DD, HH, mm):
    """
    Convert ARL time pieces to a datetime object

    Parameters
    ----------
    YY : integer year (2 or 4 digits)
    MM : integer month (1-12)
    DD : integer day (1-31)
    HH : integer hour (0-23)
    mm : integer minute (0-59)

    Returns
    -------
    d : datetime object from datetime.strptime
    """
    from datetime import datetime
    strptime = datetime.strptime
    if YY < 100:
        yf = '%y'
    else:
        yf = '%Y'
    out = strptime('%02d-%02d-%02d %02d:%02d+0000' % (YY, MM, DD, HH, mm), 
        yf + '-%m-%d %H:%M%z')
    return out
