'Convert local time to UTC'

def __convert_utc(self, yyyy, mo, dd, hh, mm):

    timetuple = datetime.strptime(('%s-%s-%s    %s:%s:00' % (yyyy, mo, dd, hh, mm)), '%Y-%m-%d    %H:%M:%S')
    auth = current.auth
    if auth.user:
        utc_offset = auth.user.utc_offset
    else:
        utc_offset = None
    try:
        t = utc_offset.split()[1]
        if (len(t) == 5):
            sign = t[0]
            hours = t[1:3]
            minutes = t[3:5]
        tdelta = timedelta(hours=int(hours), minutes=int(minutes))
        if (sign == '+'):
            utctime = (timetuple - tdelta)
        elif (sign == '-'):
            utctime = (timetuple + tdelta)
    except:
        utctime = timetuple
    return utctime
