def timeoffset_tz(localdate):
    """
    returns the timezone from utc_offset in a Python datetime object

    input:
    local (official) date and time in Python datetime format with timezone
    
    returns:
    the timezone as float with one decimal

    the timezone is returned from the datetime object as utcoffset
    timedelta in days and seconds

    """
    try:
        offset_day = localdate.utcoffset().days
    except:
        offset_day = 0
    try:
        offset_sec = localdate.utcoffset().seconds
    except:
        offset_sec = 0
    offset_tz = round((offset_day * 86400 + offset_sec) / 3600, 1)
    return offset_tz
